I saved the repost as a text file, and the original post link has been lost, and it's the same with the time command...
For example, to execute a certain command on December 31st, you can do it like this:
1. Create a batch file named 12-31.bat. Note that the file name is the date you want to execute, because this file name will be used later. The content is everything you need to do.
2. Create a second batch file, which can be named randomly, such as run.bat (this step seems to be omitted, because if this file does not exist, the third step should be automatically generated)
3. Add these sentences in AUTOEXEC.BAT
echo.|date|find "12-31">run.bat
call run.bat
Do you understand? If not, listen to me again
The result of executing echo.|date|find "12-31">run.bat in AUTOEXEC is to execute the DATE command, which is used to display or modify the date. Since this command waits for keyboard input, the ECHO. is used earlier to give a response to this command. Then, search for the date 12-31 in the output of the DATE command and store the result in the RUN batch program. If the current day is not December 31st, then there is nothing put into the RUN batch program, so there is nothing in it. The result of these two lines is equivalent to doing nothing. If the current day is December 31st, then the string "12-31" will be stored in the RUN program. Then the next line calls this RUN batch. If the previous step stores the string 12-31 in RUN, then executing RUN at this time is actually executing 12-31.BAT. Now it should be clear? This is the reason why the first batch file above must be called this name.
In fact, when you learn to use batch processing, many unimaginable functions can be realized with it. Batch processing that seems simple and outdated (in fact, the use skills of batch processing are the essence of DOS). If used well, it will produce unexpected effects. Hehe. Also, the premise for the above program to execute successfully is that there should be the FIND external command on the system, and the date display format on this computer should also be correct