CheckPoint

Job Checkpoint, Restart and Progress Indicator

ActiveBatch provides several features to allow Jobs to automatically restart or failover to an available machine. By default, Jobs that don’t have restart enabled are considered to have failed when the machine they execute on fails.

 

Two types of Job restart are provided: Machine and Process failure recovery. 

 

Restart on Reboot is the more typical and simply means that the Job is to be restarted when the machine the Job was executing on is rebooted and available.

 

Failover Restart is applicable when the Job is placed on a Generic Queue and can be re-dispatched to another available machine. Where  “Restart on Reboot” means the Job must wait until the execution machine is rebooted, “Failover Restart” means the Job can be immediately re-dispatched. 

 

When a Process Job is restarted, its “pre” step is executed, followed by the “Main” and “Post” steps. Please note that the ABAT_RESTART variable is set to YES to indicate the Job is operating under a restart condition.

 

ActiveBatch supports the concept of Checkpointing. A checkpoint represents non-volatile data that is associated with the batch Job and saved by ActiveBatch. The last checkpoint value is made available whenever the batch Job is restarted. Of course, the actual data and timing of checkpoints are purely up to the batch Job itself. To declare a checkpoint you invoke the AbatChkPt program.  For most machines the syntax is: ABATCHKPT “Checkpoint-data”

 

ABATCHKPT is the name of the checkpoint program and the data you want to checkpoint appears after the command (with an intervening space). The string specified does not have to be quoted unless the data contains embedded spaces. This command can only be issued within an ActiveBatch created Job.

 

To retrieve the checkpoint value, you must check two ActiveBatch environment variables (or logical names),

ABAT_RESTART and ABAT_CHECKPOINT. Both must be set to YES for the checkpoint value (ABAT_CHECKPOINTVAL) to be considered safe and available.

 

You can also specify a progress indicator, separate from a checkpoint that can be used to visually alert an ActiveBatch client user as to the progress of this Job. The progress value will be displayed in a portion of the Job State. The Job State is displayed in many views (although the Daily Activity list is best since it dynamically takes real-time updates).

 

Two (2) methods are available. First, you can use the ActiveBatch ReportProgress Job step. Information placed in the Description property will appear as part of a sub-state of the Job that’s executing.

 

 

Next, any scripting language (for example, PowerShell or Visual Basic Scripting) that is COM accessible can access this progress indicator through the COM library AbatScripting. Information on this library can be found in the ActiveBatch V12 COM User’s Guide.