Windows Task Scheduler Multiple Actions

/ Comments off
Windows Task Scheduler Multiple Actions 9,0/10 7535 reviews

File

  1. Windows Task Scheduler Xp

I have 2 batch files as 'actions' in a single task. The first one does a scan for viruses using microsoft security essentials.

Windows server 2012 task scheduler multiple actions

Windows Task Scheduler Xp

The second one puts the computer to sleep. The problem is that when the task is run, it seems like both batch files run simultaneously, that is, I can see the start of the virus scan, but then the computer goes to sleep almost immediately, so the scan really never has a chance to start. I understood that batch files would run in sequential order in the task scheduler. How do I make the sleep batch file wait until the scan batch file has completed?

Task scheduler action arguments

Here are the 2 simple batch files.Batch file one'C:Program FilesMicrosoft Security EssentialsMpCmdRun.exe' -scan -scantype 1Batch file twopowercfg -h offrundll32.exe powrprof.dll,SetSuspendState 0,1,0powercfg -h on. It's possible using Windows Scheduled Tasks for Windows 7, Windows Server 2008 R2, Windows Server 2012, Windows Vista.From Microsoft: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.