Alike Pre/Post Job Scripts
Categories: XenServer, Hyper-V, Physical Systems, Alike v3, Alike v4
Introduction
Alike is able to trigger custom scripts both before and after a Job is run. Additionally, Alike will perform variable substitution for the parameters to your script. Learn more about adding variables to your custom scripts and the status codes.
The following variables may be added as arguments to your custom scripts:
- %i – This will be replaced with the Alike JobID
- %t – The Job type being executed (0 = backup, 1=restore)
- %n – The name of the Job being executed
- %s – The status code from the job (only available in Post Job scripts)
The status codes are listed below:
- 0=Pending
- 1=Paused
- 2=Active
- 3=Active With Errors
- 4=Completed With Errors
- 5=Aborted
- 6=Complete
- 7=Failed
For example, a Post Job Script configured like this in the UI:
- c:\scripts\postAlike.cmd %i %n
It would be converted to this when Alike runs the script:
- c:\scripts\postAlike.cmd 27 “Nightly Guest Backup”
Final Notes
The scripts will be run under the context of the account configured to run the BackupScheduler service.