Task Scheduler

%3CLINGO-SUB%20id%3D%22lingo-sub-2693274%22%20slang%3D%22en-US%22%3ETask%20Scheduler%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2693274%22%20slang%3D%22en-US%22%3E%3CP%3EI%20need%20some%20help%20setting%20up%20the%20task%20scheduler%20on%20a%20second%20server%2C%20so%20if%20one%20server%20isn't%20available%20the%20tasks%20will%20still%20get%20run%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2693274%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3Etask%20scheduler%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2696991%22%20slang%3D%22en-US%22%3ERe%3A%20Task%20Scheduler%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2696991%22%20slang%3D%22en-US%22%3EI%20am%20not%20sure%20about%20your%20configuration%20but%20generally%20when%20the%20other%20server%20is%20not%20available%20%2C%20it%20should%20have%20certain%20condition%20for%20example%20if%20let%20say%20if%20they%20are%20communicating%20and%20the%20server%20is%20not%20responding%20(not%20available)%2C%20it%20should%20create%20some%20error%20log%20in%20the%20event%20viewer.%3CBR%20%2F%3EIn%20this%20case%2C%20you%20may%20open%20Task%20Scheduler%20and%20create%20a%20new%20task%20and%20under%20Triggers%20tab%2C%20create%20a%20New...%20and%20Begin%20the%20task%20and%20select%20On%20an%20event%2C%20select%20the%20event%20associated%20with%20the%20condition%20when%20server%20is%20not%20available.%3CBR%20%2F%3EOtherwise%2C%20you%20will%20need%20to%20run%20a%20PowerShell%20script%20and%20keep%20it%20running%20all%20the%20time%20and%20then%20define%20condition%20to%20identify%20when%20server%20is%20not%20available%20and%20run%20the%20task.%3C%2FLINGO-BODY%3E
Occasional 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?

@Randy_Thomas 

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