aptible / supercronic

Cron for containers
MIT License
1.91k stars 115 forks source link

Email on failure #14

Closed jonaskello closed 7 years ago

jonaskello commented 7 years ago

Is there some way to configure supercronic to send an email if a job fails?

krallin commented 7 years ago

No. What we do for ourselves is use a cron job monitoring tool (we use Dead Man's Snitch for it, but it's not the only game in town) to alert us when jobs don't run. Since Supercronic executes your commands using a shell, you can usually just do this in your crontab:

job: do-the-job && curl https://nosnch.in/$JOB_SNITCH_ID

Then, you just set the JOB_SNITCH_ID environment variable when running the container.