Board logo

标题: [文本处理] 如何限制批处理只能在指定日期内有效运行 [打印本页]

作者: jiangying2222    时间: 2018-3-22 22:25     标题: 如何限制批处理只能在指定日期内有效运行

本帖最后由 pcl_test 于 2018-3-22 22:53 编辑

新手请教个简单问题可以吗?
set /a str = %date:~3,1%%date:~5,2%%date:~8,2%
if "%str%" == "80319" goto begin
if "%str%" == "80320" goto begin
if "%str%" == "80321" goto begin
if "%str%" == "80322" goto begin
if "%str%" == "80323" goto begin
if "%str%" == "80317" goto begin
if "%str%" == "80318" goto begin
call %~d0\Quality\run\log.bat
exit

:begin
call %~d0\Quality\scd\mb\action.bat
exit

上面这段,是不是有限时?
如果我想加个时限,比如说 2018年10月1日之前有效,怎么弄?(问题一)
还有个问题。我想让它 没有时限又怎么弄?(问题二)


非常感谢啊!!!
作者: yhcfsr    时间: 2018-3-23 09:11

计划任务 解决问题




欢迎光临 批处理之家 (http://www.bathome.net/) Powered by Discuz! 7.2