ID #1022

Why is my Scheduled Job not Running?


If that happens it is not an issue with SQLyog!

First you must understand that any job running on Windows is running with some user privileges. It may be running with the privileges of a human user, or the privileges of a 'system' user. On Win-NT -based system the scheduler is a systems 'service' that operates independently of user logon. Win 9x (including ME) does not operate 'services' - the system itself only starts with a user logon.


However one thing is theory - another practice: There are several known issues with the Windows Scheduler. First it is a well-known issue that running a scheduled job as a human user without a password most often does not work. But even if user has a password there are several reports (search Google for instance!) that the scheduler fails if not user is logged on at schedule time. There also seems to be variations of the scheduler and how it works with various OS's and various Service Pack levels. Internet resources (and not even Microsoft's own) are not unambiguous about this.

But see attached picture. This is the setting that I have the best experience with. User is here 'NT AUTHORITY\SYSTEM'. When you uncheck 'run only if logged on' a pop-up shows up asking for a password. Just cancel it by pressing 'enter' (this user has no password!). With this setting it is safe to run SJA from an unattended computer. Now test the function by setting scheduled time a few minutes ahead, and (with NT-based systems) from start menu choose 'Start... log out'. The welcome screen appears. The system with its services is running and no user is logged on. Wait until time of schedule has been passed. Then log on, go to 'Scheduled Task' and check that job actually has been running. If the scheduler tells that the job has been running, but you did not get the expected result of it, it is not scheduling but the job itself that has failed!

But from time to time we have come across situations where the Windows Scheduler did not start a job as it should do. It is an issue with the Windows Scheduler itself. Or could be an issue an OS that needs to be repair'ed or reinstalled (there is unfortunately no way to repair or reinstall the Scheduler itself).

You might also try a third-party scheduler. Or use the command-line Windows NT scheduler that is also supplied with 2K and XP. And of course you should check too, that the job is actually able to run by executing it from command-line.

Another trick is to 'clone' the settings of another scheduled job that works fine on your system (an AV updater for instance). That is actually how I came across the idea to run scheduled SJA-jobs as user 'NT AUTHORITY\SYSTEM'.


Tags: -

Related entries:

You can comment this FAQ