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-




    • Related Articles

    • Continuity Engine Switchover/Failover Processes

      This article discusses Switchovers and Failovers, their similarities and differences. It also discusses a condition called False Failover, which can result in a Split Brain Syndrome. Learning objectives At the end of the session you should be able ...
    • Using the Neverfail Continuity Engine Management Service

      Summary This Knowledgebase article provides an introduction to the Neverfail Continuity Engine Management Service. More Information Using the Engine Management Service User Interface The Engine Management Service is the primary tool used for ...
    • How To Start and Stop An EXE Process With Engine By Using Windows Task Scheduler

      For exemplification purposes, we'll be using Notepad.exe as a process that will be started and stopped.  1. Open Neverfail Advanced Management Client and under Applications\Plugins section, Edit the System Plugin and make sure it is configured to ...
    • How to Setup Data Snapshots / Rollback for Neverfail Continuity Engine

      Summary This Knowledgebase article provides information about how to configure Snapshots, Data Rollback and Volume Shadow Copy in Neverfail Continuity Engine. More information Server Snapshots Neverfail Continuity Engine’s Snapshots (also known as ...
    • How to Create a Task In Neverfail Continuity Engine

      Summary This Knowledge base article provides general information about how to create Tasks in Neverfail Continuity Engine. More Information Tasks are a generalization and extension of start, stop, and monitor scripts. Task types are grouped by when ...