Python Script Runs Fine Manual, But Complains About ConnectTimeOut Issue on Windows Task Scheduler

Anonymous
2024-07-18T18:28:04+00:00

I have a Python script that I want run every day at a certain time. It runs perfectly fine if ran manually. However, if I run it through Task Scheduler, even if I configure it to run out of the directory, it will complain about a firewall rule configuration. I've never had this issue scheduling my Python scripts through Scheduler.

This is the error I get.

This happens near the end of my script. Why would it run into a firewall configuration issue if it is automated?

Regards,

Windows for business | Windows Server | User experience | Remote desktop services and terminal services

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question. To protect privacy, user profiles for migrated questions are anonymized.

0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Anonymous
    2024-07-19T08:18:32+00:00

    Hello,

    You can try the following steps to troubleshoot the problem:

    1. Check permissions to ensure that the user account running the task in the task scheduler has the permissions required to execute the script and is not blocked by the firewall.
    2. Configure the task scheduler task using the full path of the executable file and script file.
    3. Does the script require network access? Try configuring the task to use a user account with the permissions needed to bypass the firewall, or schedule a basic Python script that doesn't require network access and see if it runs. If so, the problem may be related to the network access requirements of the original script.
    4. View the History TAB of the Task Scheduler task, as well as application logs and system logs in the Event Viewer, for related error messages. Please enable the options below before viewing. 

    I hope this helps. Please let me know if you require further assistance or have any questions.

    Best regards

    1 person found this answer helpful.
    0 comments No comments