Windows – Why no job history despite manually triggering the scheduled job (on Windows 2008)

scheduled-taskwindowswindows-server-2008

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?

Best Answer

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.