I am trying to create a schedule task using command line which has multiple actions running more than one batch files in sequence among other things
SCHTASKS /Create /TN TaskName /SC ONLOGON /TR C:\ost\sanAuto.bat /TR C:\ost\ClEvtLog.cmd
What I have tried that didn't work:
SCHTASKS /Create /TN tsk /SC ONLOGON /TR "C:\sanAuto.bat","C:\ClEvtLog.cmd"
this one create single action to run a program as "C:\sanAuto.bat","C:\ClEvtLog.cmd"
SCHTASKS /Create /TN tsk /SC ONLOGON /TR "C:\sanAuto.bat" /TN "C:\ClEvtLog.cmd"
This one says multiple /TN not allowed
Is there a way to create tasks from command line and specify multiple actions?
Note 1 Exporting and importing the xml is not something i want to do http://iislogs.com/steveschofield/2009/03/20/creating-a-scheduled-task-with-multiple-actions-using-command-line-in-windows-server-2008/