Skip to content
cron.surf

Run a GitHub Actions workflow on the last day of every month

GitHub Actions has no exact expression for “Last day of the month”. Here is why, a workaround, and the platforms that can do it. GitHub Actions takes POSIX cron in on.schedule and runs it on the default branch, in UTC unless the entry sets a time zone.

Why GitHub Actions can’t do this exactly

Defined on Quartz as 0 0 0 L * ? · “At 00:00, on the last day of the month”

  • day of month: GitHub Actions has no “last day of the month”. Months end on the 28th to the 31st, so no single day matches.

    WorkaroundRun on days 28-31 and exit unless tomorrow is the 1st. Needs GNU date; in crontab, % is escaped as \%.
    0 0 28-31 * *  # job: [ "$(date -d tomorrow +%d)" = "01" ] || exit 0
    Not equivalent on its own: it needs a check inside the job.

GitHub Actions gotchas

5 minutes is the floorGitHub documents every 5 minutes as the shortest interval a scheduled workflow can run. Do not count on anything tighter.
Runs can be late or droppedScheduled runs are delayed at busy times, especially at the start of each hour, and some may be dropped. Avoid minute 0 if timing matters.
UTC unless you set timezoneAdd timezone: with an IANA name to the schedule entry. Without it the schedule runs in UTC.
Default branch only, and it can switch offSchedules run from the latest commit on the default branch. In public repositories they are disabled after 60 days without activity.

FAQ

What is the GitHub Actions cron expression for “Last day of the month”?

There is none that matches exactly. GitHub Actions has no “last day of the month”. Months end on the 28th to the 31st, so no single day matches.

Which time zone does a GitHub Actions schedule use?

In UTC by default. Add timezone: with an IANA name, such as Asia/Tokyo, next to cron: in the schedule entry.

Can GitHub Actions run every minute?

No. The documented minimum is every 5 minutes. For tighter intervals, trigger the workflow from outside with workflow_dispatch or repository_dispatch.

Does GitHub Actions support @hourly or @daily?

No. GitHub does not support @yearly, @monthly, @weekly, @daily, @hourly or @reboot. Use the five fields.