Reputation: 1596
I'm refereing the Microsoft documentation for running a scheduled job from command line https://technet.microsoft.com/en-us/library/cc721884.aspx but i'm not able to understand why it is not running.
I have a windows scheduled task, let's say "SAMPLE SCH JOB" in Task Scheduler. I'm trying to run the same job on the same machine from command prompt using below command but it doesn't run and throws an error "system cannot find the file" -
C:\>schtasks /Run /TN "SAMPLE SCH JOB"
ERROR: The system cannot find the file specified.
Can someone help me understand what I am missing here, why am I getting this error ?
Upvotes: 1
Views: 6882
Reputation: 485
I have tried this on my machine. If you give the correct task name, you get the following response -> SUCCESS: Attempted to run the scheduled task "SAMPLE SCH JOB".
Only when I misspelled the task name did I get the same ERROR response as yours. So I am assuming you aren't using the exact same name for the task.
Upvotes: 1