Waffles
Waffles

Reputation: 349

My schtasks don't schedule anything. :(

I'm trying to make a scheduled task, and its just not working for me.

This is the command I type in CMD: schtasks /create /sc minute /mo 1 /tn test /tr calc.exe /st 19:17:00 /sd 12/14/2009

I'm trying to tell the computer to run calculator every minute starting at 7:09 PM. Although I get a success message after I type this in and hit enter, nothing happens at 7:09. What gives?

Thanks in advance.

Upvotes: 0

Views: 2807

Answers (3)

Endemias
Endemias

Reputation: 21

Thank you popester, for the first time I get run a task using command line parameters. Waffles, my task has been created however, it also didn't run. So I added some parametters and now it works. Try:

schtasks /create /th test2 /tr "c:\temp\run.bat" /sc daily /st 18:10:00 /ru SRVIMG\Administrator /rp XXXXXXX

Where XXXXXXX is my administrator password

Upvotes: 2

ghostdog74
ghostdog74

Reputation: 343067

make sure that your task scheduler service is running as well. check in your "control panel" under "services"

Upvotes: 0

popester
popester

Reputation: 1934

/st wants HH:mm, not HH:mm:ss. The following works for me on Windows 7:

schtasks /create /sc minute /mo 1 /tn test /tr calc.exe /st 14:43 /sd 12/15/2009

Doc:

/ST   starttime    Specifies the start time to run the task. The time
                   format is HH:mm (24 hour time) for example, 14:30 for
                   2:30 PM. Defaults to current time if /ST is not
                   specified.  This option is required with /SC ONCE.

Upvotes: 0

Related Questions