• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 521
  • Last Modified:

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?
0
innocent1973
Asked:
innocent1973
  • 3
1 Solution
 
Bill PrewCommented:
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
0
 
Bill PrewCommented:
(sorry, meant missing the /TN)

~bp
0
 
innocent1973Author Commented:
Thank you for your reply.
I tried your code but it still did not work.
0
 
Bill PrewCommented:
I ran it here and it did crate the scheduled task, what are the symptoms of the problem you are having?

~bp
0

Featured Post

Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now