Forum Discussion
Randy_Thomas
Aug 27, 2021Copper Contributor
Task Scheduler
I need some help setting up the task scheduler on a second server, so if one server isn't available the tasks will still get run
Randy_Thomas
Aug 30, 2021Copper Contributor
I like the shell script idea, you wouldn't happen to have any examples would you?
Reza_Ameri
Aug 31, 2021Silver Contributor
It depends on your logic, I am not sure how you define unavailable server. You need to write if statement and if it was true then create a task.
To create task in PowerShell, you may use New-ScheduledTask command.
You may find details and examples on https://docs.microsoft.com/en-us/powershell/module/scheduledtasks/new-scheduledtask?view=windowsserver2019-ps