Cron Last Day of Month
Cron expression 0 0 28-31 * * means At 12:00 AM, on days 28th through 31st.
Cron expression to approximate the last day of each month: 0 0 28-31 * *. Note: for exact last-day scheduling use your platform's L modifier (Quartz) or a conditional script.
Cron Expression
Common use cases
- Month-end financial reconciliation and reporting
- Generating monthly billing summaries
- Archiving monthly database snapshots
- Triggering end-of-month cleanup pipelines
Want to customize this schedule?
Open it in the visual builder to tweak the expression interactively.
Open in BuilderNeed to monitor this cron job?
Cronhub tracks your scheduled jobs and alerts you if they fail or run late.
Platform usage examples
# Edit your crontab
crontab -e
# Add this line to run last day of month
0 0 28-31 * * /usr/bin/php /var/www/html/script.php
# Or run a shell script
0 0 28-31 * * /home/user/scripts/job.sh >> /var/log/job.log 2>&1# .github/workflows/scheduled.yml
name: Scheduled Job
on:
schedule:
- cron: '0 0 28-31 * *'
jobs:
run:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run job
run: echo "Running last day of month"apiVersion: batch/v1
kind: CronJob
metadata:
name: my-scheduled-job
spec:
schedule: "0 0 28-31 * *"
jobTemplate:
spec:
template:
spec:
containers:
- name: job
image: my-image:latest
restartPolicy: OnFailureRelated developer tools
More free tools for engineering workflows that pair with scheduled jobs:
Frequently asked questions
What is the cron expression for last day of month?
The cron expression is 0 0 28-31 * *. Cron expression to approximate the last day of each month: 0 0 28-31 * *. Note: for exact last-day scheduling use your platform's L modifier (Quartz) or a conditional script.
How do I schedule a cron job to run last day of month in Linux?
Open your crontab with "crontab -e" and add a new line: 0 0 28-31 * * /path/to/your/script.sh — this schedules your script to run last day of month. Save and exit; the cron daemon picks up the change immediately.
What does the cron expression "0 0 28-31 * *" mean?
Cron expression to approximate the last day of each month: 0 0 28-31 * *. Note: for exact last-day scheduling use your platform's L modifier (Quartz) or a conditional script.
Can I use "0 0 28-31 * *" in GitHub Actions?
Yes. In your workflow YAML, set the schedule trigger: on: schedule: - cron: '0 0 28-31 * *'. GitHub Actions uses standard 5-field Unix cron syntax, so this expression works as-is.