CronPup

← Guides

Alert when a scheduled Jenkins job doesn't run

Jobs triggered by cron in Jenkins ("Build periodically") have a blind spot: if the controller is down, the job is disabled, or the trigger was removed in a config change, nothing runs and nothing is reported.

Freestyle job

Add a final "Execute shell" step:

curl -fsS -m 10 https://cronpup.com/p/YOUR-UUID

Pipeline

pipeline {
  agent any
  triggers { cron('H 2 * * *') }
  stages { stage('Nightly') { steps { sh './nightly.sh' } } }
  post {
    success { sh 'curl -fsS -m 10 https://cronpup.com/p/YOUR-UUID' }
    failure { sh 'curl -fsS -m 10 https://cronpup.com/p/YOUR-UUID/fail' }
  }
}

About H

Jenkins' H spreads start times by a hash of the job name, so "H 2 * * *" runs at a fixed but arbitrary minute in the 2 a.m. hour. Use a period monitor ("every 24 hours") with an hour of grace, or a cron monitor for 0 2 * * * with 60+ minutes of grace. Start free.