I have just added a scheduled job in Windows for the first time in my life (I'm a Linux dude). The goal is to run a python script once every night and the problem is I can't understand why the scheduled job isn't run even though I manually execute it.

Here are the details:

  • There is a log file being created when the script executes. Therefor I can be sure that the job has been executed.
    • I have made sure the log file path is not read-only.
  • I have created the job as an Administrator user.
    • I checked "Execute with highest privileges" (translated from Swedish, I have a Swedish Windows installation).
  • I have tried to execute the job both by specifying Python binary as executable and script as parameter, and/or just writing up a *.bat script that does the python execution. Neither works through Windows scheduler. Both alternatives work when executing in cmd.exe.
  • I have also tried executing this job by waiting for the job to kick in. Interestingly enough, the timestamp for when the job was executed gets updated and "next scheduled date" is updated accordingly. However, nothing shows up in the "History" tab for the scheduled job.

Does anyone have input on what to do next?


What's the job status 0x0 or 0x1? The logs that you're talking about, are they from your python job or are you talking about the c:\windows\Tasks\SCHEDLGU.TXT log file?

It sounds like you have it setup correctly with the "Execute with Highest Privileges." You might set the user name and password again for the account that will execute the task. Besides the checking those logs, that's the only other thing that I could see causing an issue.

  • The job status is 0x0. What does that mean? The logs I am referring are from my Python script. I have tried setting the username for which it will be executed. It asks for the administrator password every time I save the task dialog. – Ztyx May 27 '11 at 12:15
  • Also, looking into c:\windows\Tasks\SCHEDLGU.TXT, I can't find any reference to my task that should have been executed at 02:00 this morning. – Ztyx May 27 '11 at 12:18
  • Problem solved. Running the script only when Administrator logged in worked. – Ztyx May 27 '11 at 12:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.