Friday, November 03, 2006

Windows: Running Scheduled Tasks Manually from the Command Line

I ran into an issue on a Windows XP system where the RUN command for all Scheduled Tasks was disabled and grayed out. I needed to manually run one of my scheduled tasks, and could not do it. I am not sure if this is due to domain/local policies or registry trickery, but regardless I found a way around it. Microsoft included a neat little utility called SCHTASKS.exe under the C:\Winnt\System32 folder that will allow a user to control Scheduled Tasks from the command line. I had a task called CESL that I wanted to run, so to run that task, I ran the following command:

C:\winnt\system32\schtasks.exe /run /tn CESL

That took care of my problem.

3 comments:

  1. pretty helpful - unfortunately I get a 'cannot start scheduler service' message when I try to run.
    The scheduler service is running and tasks are executing correctly via the windows task scheduler GUI.
    Anyone else come across this?

    ReplyDelete
  2. Anonymous11:49 AM

    thanks .. you just remind of this .. I suggest you edit a batch file and shortcut to quick launcher ..put a fancy icon to it ;-)

    eg:
    =========
    schtasks.exe /run /tn Job-name
    exit
    ===================

    mids

    ReplyDelete