Running batch files sequentially in win 7 task scheduler

狂风中的少年 提交于 2019-12-03 05:51:41

It's possible using Windows Scheduled Tasks for Windows 7, Windows Server 2008 R2, Windows Server 2012, Windows Vista.

From Microsoft documentation:

A task action is the work that is performed when the task is run. A task can have a single action or a maximum of 32 actions. Each action contains settings that determine how the action is performed. A task's actions are displayed on the Actions tab of the Task Properties or Create Task dialog box. When multiple actions are specified, they are executed in sequential order starting with the action at the top of the list in the Actions tab...

I believe the easiest way to fix this is to have the first batch file call the second batch file. Since the commands in batch files are processed sequentially that would fix your problem.

Brian

Another way is for the action to contain START /W C:\MyScript.bat The /W is a parameter for the start command to wait for completion before returning control.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!