The adtChkpt utility can be used to set or retrieve the checkpoint for an executing job. This utility is meant to be used when you have a batch file that executes several different processes and you want to let adTempus know where things stand in case the job needs to be restarted from this point later.
This program relies on information put in the environment by adTempus and therefore will only work within a batch file run by adTempus. |
To set the checkpoint, use the syntax
adtchkpt /s "checkpoint name"
Where "checkpoint name" is whatever string you want to pass as the checkpoint.
To query the checkpoint, use the syntax
adtchkpt /q "candidate1" "candidate2" "candidate3" [...]
Where each "candidate" value is a possible checkpoint for the job.
adTempus sets the exit code to the index of the candidate that matches the checkpoint, or to 0 if no match is found. For example, if the checkpoint were "candidate2", the example above would return an exit code of 2. You can test the exit code in your batch file and use it to jump to the correct place in the batch file when a job is being resumed.
For example, your batch file might look like this:
@echo off
rem check to see if the job is being started with a checkpoint.
rem if so, jump to the proper step
"c:\program files\arcana development\adtempus\adtchkpt" /s "step1" "step2" "step3" "finished"
if errorlevel 4 goto the_end
if errorlevel 3 goto step3
if errorlevel 2 goto step2
:step1
rem tell adTempus we're starting step 1
"c:\program files\arcana development\adtempus\adtchkpt" /s "step1"
rem run the preprocessing program...
c:\prod\preprocess.exe
:step2
rem tell adTempus we're starting step 2
"c:\program files\arcana development\adtempus\adtchkpt" /s "step2"
rem run the main process
c:\prod\theprocess.exe
:step3
rem tell adTempus we're starting step 3
"c:\program files\arcana development\adtempus\adtchkpt" /s "step3"
rem do cleanup
c:\prod\cleanup.exe
"c:\program files\arcana development\adtempus\adtchkpt" /s "finished"
:the_end