Cron Expression for the First Day of Every Month
Run a cron job on the first day of every month at midnight using 0 0 1 * *. Standard schedule for monthly reports, billing, and archival.
Expression
0 0 1 * * At 00:00 on the 1st of every month
Use Cases
- • Generating monthly financial reports
- • Running monthly billing and invoicing
- • Archiving the previous month logs
- • Resetting monthly usage counters and quotas
Code Examples
Crontab
# At 00:00 on the 1st of every month
0 0 1 * * /path/to/your/script.sh GitHub Actions
name: Scheduled Job
on:
schedule:
- cron: '0 0 1 * *'
jobs:
run:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: echo "Running First Day of Every Month" systemd Timer
[Unit]
Description=First Day of Every Month timer
[Timer]
OnCalendar=*-*-* *:*:00
Persistent=true
[Install]
WantedBy=timers.target Tips
- ✓ Day-of-month field accepts 1-31
- ✓ The @monthly shorthand equals 0 0 1 * * in most systems
- ✓ Run at a business-friendly time: 0 9 1 * * for 9 AM on the 1st
- ✓ Always test what happens if the 1st falls on a weekend
Frequently Asked Questions
Is @monthly the same as 0 0 1 * *?
Yes, @monthly is a shorthand for 0 0 1 * *, meaning midnight on the first day of every month.
How do I run on the 15th of each month instead?
Change the day-of-month field to 15: 0 0 15 * * runs at midnight on the 15th of every month.