You can use a task action definition to register a new scheduled task or update an existing task registration.Ī task can have a single action or a maximum of 32 actions. The New-ScheduledTaskAction cmdlet creates an object that contains the definition of a scheduled task action.Ī scheduled task action represents a command that a task executes when Task Scheduler runs the task. In this article Syntax New-Scheduled Task Action
Set the action: This is where you will "Start a program" and reference the bat file that you created in the first step.Usually this will be a certain time of the day/week/month. If this is on a server, I recommend on the general tab of the task to set SYSTEM as the user account when running the task and check run whether user is logged in or not and run with highest privileges.Create a task in the windows task scheduler.
If you want another job, on the next line, just repeat: "C:\Program Files\Domo\Workbench\wb.exe" run-Job -s -j 496.The workbench job ID can be found in workbench on the overview of the job (click on the job name). In here you are calling the program workbench and running job 495.Command line: "C:\Program Files\Domo\Workbench\wb.exe" run-Job -s -j 495.I recommend using Notepad++ to create them, but you can also use Windows Notepad. For those not familiar with batch files, it is basically a .txt file with. They will run in the order that you list them, so you can put multiple jobs in one batch file.