问题
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