开发者

running bat file using windows scheduler [closed]

开发者 https://www.devze.com 2022-12-08 08:31 出处:网络
Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed. This question is off-topic. It is not currently accepting answers.

Want to improve this question? Update the question so it's on-topic for Stack Overflow.

Closed 13 years ago.

Improve this question

i wanted开发者_运维知识库 to run a .bat file in windows task scheduler, so i opened it, added a new task, browsed to the bat file, and... nothing happened. so i changed the timing to see if it'll run, and it didn't. next i right-clicked on the task and chose "run"- it didn't run. the file itself is only one line, basically backups a folder to a another location. it runs fine when not in the scheduler.

what can be done?

thank you


You should not give batch file directly as a task. Instead you should use

"C:\Windows\system32\cmd.exe" /C <completepathtobatchfile> <argstobatchfileifany>

the complete path to cmd.exe may vary in your case depending on which drive you installed OS and which version you are using.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号