Link to home
Start Free TrialLog in
Avatar of innocent1973
innocent1973

asked on

SCHTASK

Hello Experts,
I am trying to create a scheduled task by using command prompt. My trying is such below:
schtasks /create /sc minute /mo 2 "test"  /tr c:\\Program Files\test.exe

But unfortunately it doesnt work. How can I set the correct path by using this command line?
Avatar of Bill Prew
Bill Prew

I think you are missing the /TR, and will also need to quote the /TR value since it contains spaces.

schtasks /create /sc minute /mo 2 /tn "test"  /tr "c:\Program Files\test.exe"

~bp
ASKER CERTIFIED SOLUTION
Avatar of Bill Prew
Bill Prew

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of innocent1973

ASKER

Thank you for your reply.
I tried your code but it still did not work.
I ran it here and it did crate the scheduled task, what are the symptoms of the problem you are having?

~bp