This Knowledge base article provides general information about how to create Tasks in Neverfail Heartbeat V5.3.0 and later.
Tasks are a generalization and extension of the start, stop, and monitor scripts in earlier versions of Neverfail Heartbeat.
Task types are grouped by when the tasks are run, and include the following:
- Network Configuration: – This is the first type of task to be run when applications are started, and is intended to launch dnscmd, dnsupdate. Where multiple dnscmds are required, these can be contained in a batch script, which is then launched by the task. Network Configuration tasks are the only types of task, which can vary between Primary and Secondary servers.
- Pre/Post Start: These tasks are run before and after services are started on the active server.
- Pre/Post Stop: These tasks are run before and after services are stopped on the active server
- Pre/Post Shadow: These tasks are run before and after a shadow copy is created on the active server by the Data Rollback Module.
- Rule Action: These tasks can be configured to be run in response when a rule is triggered, or a service fails its check.
Tasks can be defined and implemented by plug-ins or by the user, or they can be built-in tasks defined by Neverfail Heartbeat itself. User-defined tasks are implemented as command lines, which can include launching a batch-script. Examples of built-in tasks include monitoring a protected service state on the active and passive servers. An example of a Plug-in-defined task is the discovery of protected data and services for a particular application.
To navigate to the ‘Tasks’ tab, login to the Management Client, select the Application button on the left navigation panel of the screen, and click on the ‘Tasks’ tab.
Add a Task
- To add a task, click on the Add button to invoke the ‘Add Task’ dialog.
- Assign a name to the task and select the task type from the drop down (Note: With Neverfail Replicator, the only Rule Action Task allowed is the Log Alert task).
- Browse to the script, .bat file, or command to be performed. Once all entries have been made, click on OK .
Should the ‘Command’ entry require specific user credentials, click on the User Accounts button in the upper right of the pane to add user accounts thereby making them available to be selected in the ‘Add Task’ dialog under the ‘Run As’ drop down.
Edit a Task
To edit a task, select the task in the ‘Tasks’ pane and click on the Edit button. Editing allows you to edit the interval of the task or to disable the task as well.
After completing edits of the task, click on the OK button to accept the settings and dismiss the dialog.
Remove a Task
To remove a task, simply select the desired task and click on the Remove button. Neverfail presents a confirmation dialog asking if you are sure you want to remove the task. Acknowledge the dialog and the task is immediately removed.
Note: A task removed during execution will continue to execute. For more information about this topic, please see Knowledgebase article #1376 - ' A Task Removed During Execution Will Continue to Execute'.
Start a Task Manually
Neverfail provides the flexibility to wait for either the designated period or event to occur before launching the task or to launch the task immediately. To launch the task immediately, select the desired task and then click the Run Now button. Neverfail responds by immediately launching the task.
Neverfail Heartbeat V5.3.0 and Later
Knowledgebase article # 1380
- Command Tasks Running a Batch File, Script, or External Command on the Passive Server Must Be Manually Copied to the Passive Server.
Knowledgebase articel # 1551 - How to Create a Task to Synchronize the Time of the Passive Server with the Active Server When Neverfail Heartbeat V5.3 and Later is installed.
This information is also readily available in the Neverfail Heartbeat and Neverfail Replicator Technical Reference Guide.