How to setup scheduled automatic switchover using Task Scheduler

How to setup scheduled automatic switchover using Task Scheduler

Summary

This Knowledgebase article provides instructions on how to configure a scheduled automatic switchover between the servers in a Neverfail cluster. Such automation might be used for applying updates and patches, perform maintenance, etc

Procedure

Part 1 Creating the scripts to execute the switchover commands

  1. Login with the local built-in administrator account or the User account under which Neverfail Continuity Engine has been installed.
  2. In the C:\Program Files\Neverfail\R2 folder create a subfolder called Scrips
  3. In the new folder of the Primary server create a new batch file called MakeActiveSecondary.bat
  4. In the new folder of the Secondary server create a new batch file called MakeActivePrimary.bat
  5. Open the corresponding batch file and type/copy the content below:
            On the Primary:
  1.             cd /d C:\Program Files\Neverfail\r2\bin
  2.             nfcmd localhost MakeActive SECONDARY false

            On the Secondary:
  1.             cd /d C:\Program Files\Neverfail\r2\bin
  2.             nfcmd localhost MakeActive PRIMARY false

Part 2 Automating the scrips using Task Scheduler

  1. Open the Windows Task Scheduler -> Action->Create Task



  2. Provide a task name, i.e. Make Secondary Active (On the Primary server) or Make Primary Active (on the Secondary server) and select the task to Run whether the user is logged on or not
  3. Navigate to the Trigger tab and in there set the time (day and hour) when you want the switchover to be triggered


  4. On the Actions tab, make sure that Start a program is selected and use the Browse button to navigate to the scripts previously created


Conclusion


You can repeat the above steps on each Neverfail Cluster in order to achieve automated switchover in both directions. Make sure to use the appropriate script.

Applies To

Neverfail Engine v8 and Later


Related Information

None

 

KBID-