How to make batch file start at a specific time every day?

自作多情 提交于 2019-12-12 06:44:48

问题


How do I write a batch file that starts at 2 AM every day?

For example, remove and make a folder:

:START
rmdir /s /q "D:\share"
@ping 127.0.0.1 -n 5 -w 100 
mkdir "D:\share"
@ping 127.0.0.1 -n 5 -w 100

回答1:


You just need to create a regular batch file and then create a scheduled task.

This page provides simple step-by-step instructions: http://www.computerhope.com/issues/ch000785.htm




回答2:


schtasks /create /sc daily /TN AName /tr "Path-to-your-batch-file" /st 02:00 /f


来源:https://stackoverflow.com/questions/20171624/how-to-make-batch-file-start-at-a-specific-time-every-day

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!