Task Scheduler

Copper Contributor

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

3 Replies
I am not sure about your configuration but generally when the other server is not available , it should have certain condition for example if let say if they are communicating and the server is not responding (not available), it should create some error log in the event viewer.
In this case, you may open Task Scheduler and create a new task and under Triggers tab, create a New... and Begin the task and select On an event, select the event associated with the condition when server is not available.
Otherwise, you will need to run a PowerShell script and keep it running all the time and then define condition to identify when server is not available and run the task.
I like the shell script idea, you wouldn't happen to have any examples would you?


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 New-ScheduledTask (ScheduledTasks) | Microsoft Docs