- Pre command: before Scout scans the job. Scout waits for it, so it can prepare files in the folder first.
- Post command: after the job finishes, whether it uploaded, was unchanged, or failed. Cancelling skips it.
Set up
Follow the shared custom-script setup for uploading files, configuring independent PRE and POST commands, execution limits, and secret handling. The same commands run for every job. UseTHREETOONEGO_JOB_NAME to act on specific jobs. Scout prepares jobs concurrently, so their scripts can overlap; keep per-job output separate.
Cancel operation stops the active Scout commands, and cancellation skips POST.
Environment variables
Use shell variables such as$THREETOONEGO_JOB_NAME in commands and scripts. The {{ job_name }} syntax applies to HTTP message and JSON templates, and is not expanded in shell scripts.
In the pre command these describe the job’s state from its previous run. In the post command they describe the run that just finished.
Example: report each job to a health check
after-job.sh
THREETOONEGO_LAST_STATUS values after a job:
Set POST command to
after-job.sh.
The Scout image is a minimal Alpine image with
sh and curl. Other tools, such as database clients, aren’t included. To dump a database before a backup, run the dump on the host on a schedule ahead of Scout’s cycle.