Run Jobs Monthly on the First Day at 1 AM | CronBase

cron expression Standard
$ 0 1 1 * *

At one o'clock in the morning on the first calendar day of every month.

This standard cron expression executes a scheduled task once a month at exactly one AM on the first day of the month. It is commonly deployed in production environments to automate monthly billing cycles, compile system performance reports, rotate database partition tables, and trigger recurring subscription renewals.

Minute
0
Hour
1
Day of Month
1
Month
*
Day of Week
*
How it works

Next 5 Runs

  • in 6d 4h
  • in 37d 4h
  • in 67d 4h
  • in 98d 4h
  • in 128d 4h

* Tools

Code & Implementations

Bash
#!/usr/bin/env bash
set -euo pipefail
# Production wrapper script for monthly database archival
# Designed to be triggered by cron: 0 1 1 * *
LOG_FILE="/var/log/db_archive_monthly.log"
echo "[$(date -u +'%Y-%m-%dT%H:%M:%SZ')] Starting monthly database archival..." >> "$LOG_FILE"
if ! pg_dump -U db_user -h localhost prod_db | gzip > "/backups/db_backup_$(date +'%Y-%m-%d').sql.gz"; then
    echo "[$(date -u +'%Y-%m-%dT%H:%M:%SZ')] ERROR: Backup failed!" >&2
    exit 1
fi
echo "[$(date -u +'%Y-%m-%dT%H:%M:%SZ')] Archival completed successfully." >> "$LOG_FILE"
Setup notes

Save this script to /usr/local/bin/monthly_archive.sh, make it executable using chmod +x, and add '0 1 1 * * /usr/local/bin/monthly_archive.sh' to your system crontab.

Last verified:

Partner UptimeRobot

Keep this cron job monitored 24/7

UptimeRobot alerts you the moment a scheduled job stops responding. Free plan monitors up to 50 endpoints — no credit card required.

Platform Equivalents

AWS EventBridge

Standard cron expressions often need conversion for AWS EventBridge schedules.

EventBridge Rule
cron(0 1 1 * ? *)

Systemd Timer

OnCalendar*-*-01 01:00:00

my-task.timer
[Unit]
Description=Timer for cron expression: 0 1 1 * *

[Timer]
OnCalendar=*-*-01 01:00:00
Persistent=true

[Install]
WantedBy=timers.target

Last verified:

Frequently Asked Questions

What happens if the server is down at 1:00 AM on the first of the month?

If your system is offline during the execution window, standard cron will miss the run entirely. To prevent skipped monthly jobs, use an orchestrator like Kubernetes with a startingDeadlineSeconds policy, or use tools like Anacron which detect missed executions and run them immediately upon system startup.

How does Daylight Saving Time (DST) affect the 1:00 AM monthly schedule?

If your system is configured to use a local timezone that observes DST, the job could run twice or be skipped when clocks transition. To avoid this operational hazard, configure your cron daemon, application scheduler, or Kubernetes cluster to run strictly in UTC.

Can I run this job on the last day of the month instead of the first?

Standard cron syntax does not native support 'L' (last day). To target the last day of the month, you must schedule the job to run daily during the end-of-month window (e.g., days 28-31) and include a wrapper script that checks if tomorrow is the first day of the next month.

Why should I run a monthly job at 1:00 AM instead of midnight (00:00)?

Running jobs at exactly midnight on the first of the month often conflicts with system-level rollover tasks, database log rotations, and third-party API batch routines. Scheduling at 1:00 AM provides a buffer, reducing resource contention and preventing race conditions.

How do I test a monthly cron job locally without waiting a month?

You can test the execution logic by temporarily changing the cron schedule in your local configuration to run every minute (* * * * *). Alternatively, configure your task runner to allow manual triggering (ad-hoc execution) via an admin CLI command or API endpoint.

* Explore

Related expressions you might need

Last verified:

Was this helpful?