如何创建批处理文件计时器以全天执行/调用另一个批处理

问题描述:

我如何创建一个批处理文件计时器来在一天中执行/调用另一个批处理也许在给定的时间运行但不在周末运行?必须在系统时间运行也可以.cmd在xp server 2003上运行

How do I create a batch file timer to execute / call another batch through out the day Maybe on given times to run but not to run on weekends ? Must run on system times can also be .cmd to run on xp server 2003

对于脚本的计时器部分,我强烈建议使用:

For the timer part of your script i highly reccomend using:

echo.
echo Waiting For One Hour... 
TIMEOUT /T 3600 /NOBREAK
echo.
echo (Put some Other Processes Here)
echo.
pause >nul

此脚本等待 1 小时(3600 秒),然后继续执行脚本,用户无法按任何按钮绕过计时器(除了 CTRL+C).

This script waits for 1 hour (3600 seconds) and then continues on with the script and the user cannot press any buttons to bypass the timer (besides CTRL+C).

你可以使用

Timeout /t 3600 /nobreak >nul

如果您不想在屏幕上看到倒计时.

If you don't want to see a countdown on the screen.