About this tool
A crontab line starts a command and then forgets it. If the backup exits 1, cron’s own mail is easy to miss and often never configured. The wrapper on this page runs the command, keeps the exit code and the duration, and posts one event to Trigv.
The level follows the result. A non-zero exit is error. A zero exit is success. If you set a slow-run threshold and the command is still zero but slower than that, the level is warning. You can turn each of those off. The last lines of output go in the description, up to the number you choose, and an idempotency key is built from the job name and the start time so a retry of the same run does not count twice.
The script never contains your API key. It expects TRIGV_API_KEY in the environment of the user who owns the crontab. Put the key in that user’s shell profile or in the crontab’s own environment, not in the script you commit.
Bash, Python, PHP, and Node versions call the same endpoint: POST https://api.trigv.com/v1/events. Required fields are channel and title. Optional fields used here are description, level, and idempotency_key. Levels are info, success, warning, and error.