Cron 1st and 15th of Every Month
Set up a cron job on the 1st and 15th of every month at midnight with 0 0 1,15 * *. Detailed field breakdown and semi-monthly use case examples.
Cron Expression
0 0 1,15 * *
Field Breakdown
| Field | Value | Meaning |
|---|---|---|
| Minute | 0 | At 0 |
| Hour | 0 | At 0 |
| Day of Month | 1,15 | At 1, 15 |
| Month | * | Every month (1–12) |
| Day of Week | * | Every day of the week (Sun–Sat) |
Detailed Explanation
The cron expression 0 0 1,15 * * schedules a task to run twice per month, on the 1st and 15th day of each month at midnight.
Field-by-field breakdown:
0(Minute): At minute 0. The task fires at the start of the hour.0(Hour): At hour 0 (midnight). The task runs at the beginning of each specified day.1,15(Day of Month): On the 1st and 15th days of the month. The comma-separated list specifies both dates.*(Month): Every month from January through December. No restriction on the month.*(Day of Week): Every day of the week. No restriction on the day, so it runs regardless of which day these dates fall on.
This means your task will execute 24 times per year, twice per month. This is the standard semi-monthly schedule used extensively in payroll, billing, and financial reporting. The 1st-and-15th pattern divides each month roughly in half, though the gap varies slightly between 14 and 16 days depending on the month's length. Both dates exist in every month, ensuring reliable execution. This expression is supported by standard cron on Linux/macOS, as well as cloud services like AWS CloudWatch, Google Cloud Scheduler, and GitHub Actions.
Use Case
Perfect for semi-monthly payroll processing where employees are paid on the 1st and 15th, triggering salary calculations and direct deposits.
Try It — Interactive Builder
On days 1,15 of every month at midnight
Next 10 Executions
Ctrl+Shift+C to copy expression