Scheduled Tasks on HA Pairs in Windows
Sometimes you might find yourself deciding that a Scheduled task is required for some report or file transfer on a production system. The production system, however, is part of a high availability (HA) pair. The particular method of dealing with HA in this particular ( hypothetical of course ) case works by moving an IP Address called a Virtual IP address between the servers of the HA Pair. Whichever server holds the VIP is the current node. Your application needs to know if it is executing on the current node before starting. Wrap your application in a very simple snippet of Comand Line script that: Looks for the VIP in ipconfig. If no errors found then jump to the section of your script that launches your application or another script to do the task. If an error is found then jump to the section of your script that notifies the log. @echo off REM #Testing FIND in IPCONFIG SET VIPTHATWORKS="192.168.122.1" SET VIPTHATFAILS="192.168.122.127" ipconfig /all | find %