CronTool
Cron expression editor & debugger

Jenkins cron — last day of the month

Jenkins cron does not support the L modifier. To trigger a Jenkins build on the last day of every month, use the multi-cron pattern across three trigger lines, or schedule daily and skip the build in a pipeline when block.
See the full Jenkins cron guide for the syntax (including the H hash modifier), or the cross-library last-day-of-month guide for the equivalent in other schedulers.

Examples

  • 018***
    Every day at 18:00
  • 0*/5***
    Every 5 hours
  • 018**1-5
    Weekdays at 18:00
  • 001**
    Once a month

Cheatsheet

FieldRequiredValues RangeWildcardsminuteYes0-59, - * / hourYes0-59, - * / day of monthYes1-31, - * / L W monthYes1-12, - * /day of weekYes0-7, - * / L

Calendar

View future cron matches in a calendar

April 2026

Showing next 1000 cron schedules

Loading...

Multi-cron trigger pattern (Pipeline)

In a declarative pipeline, the triggers directive accepts multiple cron lines. Each line is a separate trigger; Jenkins fires whichever matches the current time.

pipeline {
  agent any
  triggers {
    cron('''
      0 0 30 4,6,9,11 *
      0 0 31 1,3,5,7,8,10,12 *
      0 0 28 2 *
    ''')
  }
  stages {
    stage('Month-end') {
      steps {
        // ... your last-day-of-month work
      }
    }
  }
}

The triple-quoted string is parsed line-by-line. The Feb 28 line covers non-leap years; for leap-year-safe handling, add a fourth line for Feb 29 plus a runtime check.

Daily trigger + runtime skip

A simpler alternative: schedule daily and use a when block to skip non-last-day builds.

pipeline {
  agent any
  triggers {
    cron('H 0 * * *')   // daily at a stable minute past midnight
  }
  stages {
    stage('Month-end work') {
      when {
        expression {
          // True when tomorrow is the 1st (i.e. today is the last day).
          return sh(returnStdout: true, script: "date -d tomorrow +%d").trim() == "01"
        }
      }
      steps {
        // ... your last-day-of-month work
      }
    }
  }
}

The H 0 * * * cron uses the Jenkins H modifier in the minute field — Jenkins picks a stable minute based on the job name hash so the build fires at, say, 00:17 every day instead of 00:00 sharp.

Freestyle job configuration

For a Freestyle job (non-pipeline), enter the multi-cron expression in the “Build periodically” box:

# Run on the last day of every month at midnight
0 0 30 4,6,9,11 *
0 0 31 1,3,5,7,8,10,12 *
0 0 28 2 *

Comments (lines starting with #) are accepted in the trigger field — useful for documenting complex multi-cron setups in place.

Jenkins-specific pitfalls

  • SCM polling — if your job triggers on SCM changes too, the build will fire whenever code is pushed, regardless of date. Use the when block to gate the actual work.
  • Build queueing — Jenkins can't run two instances of the same job concurrently by default. If your last-day job runs long, the next month's trigger may queue.
  • Timezone — Jenkins cron honours the controller's JVM timezone by default. For UTC, set the JVM property -Dorg.apache.commons.jelly.tags.fmt.timeZone=UTC or use a per-trigger TZ prefix.

Frequently asked questions

Does Jenkins cron support the L modifier for last day of the month?

No. Jenkins uses a 5-field cron syntax with custom modifiers (`H` for hash, `*/N` for steps, ranges and lists). It does not support `L` or `LW`. To run a Jenkins job on the last day of the month, use the multi-cron pattern across three trigger entries or schedule daily and skip in a pipeline step.

What does the H modifier do in Jenkins cron?

`H` is Jenkins' deterministic hash modifier. `H/15 * * * *` distributes the run across the hour based on a hash of the job name — instead of all jobs firing at minute 0, each job picks a stable minute. Useful for spreading load when many jobs share the same cadence. `H` is not a wildcard for L; it doesn't help with last-day-of-month.

How do I use multiple cron triggers in a Jenkins pipeline?

The `triggers { cron('...') }` block accepts a multi-line string. Each line is a separate trigger. Combine the three month-length expressions in one block and Jenkins fires whichever line matches the current time.

How do I skip a Jenkins build that's not on the last day?

Use a `when` block in the pipeline stage with a Groovy expression that checks the date: `expression { return new Date().clone().tap { add(Calendar.DATE, 1) }.format('dd') == '01' }`. Or run the check inside an early shell step and abort the build with `currentBuild.result = 'NOT_BUILT'; error('Not last day')`.

What timezone does Jenkins cron use?

By default, the JVM timezone of the Jenkins controller. Set the timezone explicitly with the `TZ` parameter prefix: `TZ=America/New_York` on a line above the trigger. Jenkins 2.293+ also supports per-trigger timezone via the `cronTrigger` plugin.

Ready to schedule it?

Point Crontap at any URL. Pick any cron. Done.

WordPress, Shopify, Railway, Cloud Run, Vercel, HubSpot, Ghost, your own box. If it answers HTTP, Crontap can drive it on a clock you can read, in the timezone that actually matters, and page you when something breaks.

Free forever tier ・ No credit card required

Your next schedule
GET/wp-cron.php?doing_wp_cron=1

Schedule

every 5 minutes

Next run

in 23s

Apihustle Logo

This tool is part of the Apihustle suite - a collection of tools to test, improve and get to know your API inside and out.

  • Clobbr logo

    Clobbr

    The app & CLI tool to test API endpoint speed.

    Visit
  • Crontap logo

    Crontap

    Schedule recurring API calls using cron syntax.

    Visit
  • CronTool logo

    CronTool

    Debug multiple cron expressions on a calendar.

    Visit

  • Page AI

    AI Website Generator that designs and writes clean code.

    Visit
  • Shipixen

    Generate customized boilerplates in minutes.

    Visit
  • Page UI

    Landing page UI components for React & Next.js

    Visit