1、功能:windows平台定时完成某任务
2、要点:
1)定时实现: ping
2)时间比较:"11:00:00" == "%time:~0,8%"
3)不断循环:goto
4)具体功能:可能是启动某个程序、打印某个日志
bat脚本代码:
@echo off :Again ping 127.0.0.1 -n 100 > nul, if "11:00:00" == "%time:~0,8%" ( echo "Called000000000000000", goto Again ) else ( if "16:00:00" == "%time:~0,8%" ( echo "Called11111111111111", goto Again ) else ( if "13:55:00" == "%time:~0,8%" ( echo "Called22222222222222", goto Again ) else ( echo "Waiting Call", echo %time:~0,8%, goto Again ) ) )
原文:http://blog.csdn.net/lonelyrains/article/details/45149791