Run on the 1st and 15th of Every Month | CronBase

cron expression Standard
$ 0 0 1,15 * *

At midnight on the first and fifteenth day of every month

The `0 0 1,15 * *` cron expression schedules a task to execute at exactly midnight (12:00 AM) on the first and fifteenth days of every month. This semi-monthly cadence is commonly used for processing payroll, generating bi-weekly financial statements, executing recurring billing cycles, and performing mid-month data archival tasks.

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

Next 5 Runs

  • in 6d 3h
  • in 20d 3h
  • in 37d 3h
  • in 51d 3h
  • in 67d 3h

* Tools

Code & Implementations

Bash
# Add this line to your crontab using the 'crontab -e' command\n0 0 1,15 * * /usr/local/bin/run-biweekly-billing.sh >> /var/log/billing.log 2>&1
Setup notes

Open your user crontab editor using bash, paste this line at the bottom, and ensure the target execution script is marked as executable.

Last verified:

Partner BetterStack

Monitor this schedule in production

Get alerted the moment this cron job fails, is late, or doesn't run. BetterStack tracks execution, duration, and output — no infrastructure required.

Platform Equivalents

AWS EventBridge

Standard cron expressions often need conversion for AWS EventBridge schedules.

EventBridge Rule
cron(0 0 1,15 * ? *)

Systemd Timer

OnCalendar*-*-01,15 00:00:00

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

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

[Install]
WantedBy=timers.target

Last verified:

Frequently Asked Questions

How can I handle timezone changes for a twice-monthly cron job?

To prevent Daylight Saving Time (DST) shifts from causing duplicate runs or missed executions, configure your cron runner or host server to operate entirely in UTC. This ensures execution occurs at the exact same physical interval regardless of seasonal clock changes.

What happens if the server is offline during the scheduled execution time?

Standard cron does not catch up on missed executions. If your server is offline at midnight on the 1st or 15th, the job will not run until the next scheduled date. For critical tasks, use a tool like anacron or implement a startup check that detects missed runs.

How can I test this cron schedule without waiting for the 1st or 15th?

You can simulate the execution by temporarily modifying the cron expression to run in the next few minutes (e.g., `*/5 * * * *`) or by manually triggering the underlying script or Kubernetes CronJob using `kubectl create job --from=cronjob/my-job`.

Can I schedule this job to run only on weekdays if the 1st or 15th falls on a weekend?

Standard cron cannot natively combine day-of-month and day-of-week with an 'AND' condition; it treats them as 'OR'. To achieve this, you must run the cron job on the 1st and 15th, and then use an inline shell script check like `[ $(date +%u) -le 5 ]` to exit early on weekends.

Why is running a resource-heavy database backup at midnight on these days risky?

Midnight is a highly contested slot where many default system maintenance tasks, log rotations, and automated backups trigger simultaneously. This causes resource contention. Shifting your schedule to an off-peak time like 02:15 AM reduces CPU and disk I/O bottlenecks.

* Explore

Related expressions you might need

Last verified:

Was this helpful?