none
Multiple actions Schtasks /TR RRS feed

  • Question

  • Hello guys

    I'm automating the deploy of a backup tool, and the process involves creating some tasks. My intention is to make the tasks also be created by a script batch.

    I'm having a problem creating a multi-action task. For example.

    It works:

    SchTasks /Create /TN “My Task” /TR "%ROOT%\bkp.bat param" /SC DAILY /ST 22:00 /RU Natan /RP XXXX /RL HIGHEST 

    But I need something like:

    SchTasks /Create /TN “My Task” /TR "%ROOT%\bkp.bat param" /TR "%ROOT%\bkp2.bat param2" /SC DAILY /ST 22:00 /RU Natan /RP XXXX /RL HIGHEST

    How can I create a multi-action task through a batch script?

    Thank you in advance,
    Natan Rocha.



    • Moved by Bill_Stewart Friday, March 15, 2019 6:12 PM Off-topic
    Sunday, January 20, 2019 8:51 PM

All replies

  • Use PowerShell.  It is much better at creating tasks and can create multi-action tasks easily.

    help New-ScheduledTaskAction -ShowWindow


    \_(ツ)_/

    Sunday, January 20, 2019 9:09 PM