Qaynaq LABS · TOOLS

CRON · DECODE

0 0 1 * 5

This cron expression runs at midnight (00:00) on the 1st day of every month, but only if that day is a Friday (day-of-week 5).

Field-by-field

PositionValueMeaning
minute 0 The job runs at the 0th minute of the hour.
hour 0 The job runs at the 0th hour (midnight).
day-of-month 1 The job runs on the 1st day of the month.
month * The job runs every month, regardless of the month.
day-of-week 5 The job runs only if the day is Friday (5).

Next fires (UTC)

  • 2024-01-05 00:00:00 UTC
  • 2024-02-02 00:00:00 UTC
  • 2024-03-01 00:00:00 UTC
  • 2024-04-05 00:00:00 UTC

Watch out for

  • This expression will only fire if the 1st day of the month is a Friday. If the 1st is not a Friday, the job will not run that month.
  • If the 1st day of the month is a Friday, it will run regardless of the month.

Equivalent forms

  • 0 0 1 * 0 (if Sunday is represented as 0)
  • 0 0 1 * 7 (if Sunday is represented as 7)
  • 0 0 1 * */5 (equivalent if you want to run every 5 days, but this is not the same logic)

About cron expressions

Cron is the standard format Unix-like systems use to schedule recurring jobs: five space-separated fields representing minute, hour, day of month, month, and day of week. The syntax is dense but unambiguous — once you can read it, you can express almost any schedule.

Qaynaq Labs' cron decoder works in both directions: paste an existing expression to read it out in English, or describe a schedule and get a valid cron string back. Each result includes the next few fire times, any caveats (like end-of-month edge cases), and equivalent alternative forms.

Frequently asked

Why does the day-of-month and day-of-week conflict?

In cron, if both day-of-month and day-of-week are specified, the job runs when either condition is met. However, in this expression, the day-of-week (5) is the only condition that matters because the day-of-month (1) is fixed. The job will only run if the 1st day of the month is a Friday.

Can I simplify this expression?

Yes, you could use '0 0 1 * 5#1' to explicitly state the first Friday of the month, but this is not standard cron syntax. The given expression is already correct for the intended purpose.