如何创建批处理文件计时器以全天执行/调用另一个批处理 [英] How do I create a batch file timer to execute / call another batch throughout the day

查看:30
本文介绍了如何创建批处理文件计时器以全天执行/调用另一个批处理的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我如何创建一个批处理文件计时器来在一天中执行/调用另一个批处理也许在给定的时间运行但不在周末运行?必须在系统时间运行也可以.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.

这篇关于如何创建批处理文件计时器以全天执行/调用另一个批处理的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆