What is meaning of this cron expression 0 50 13 1 1/1 ? *?

3.7k Views Asked by At

What does the following Cron expression mean?

0 50 13 1 1/1 ? *
  • 0: means 0 seconds
  • 50: means 50 minutes
  • 13: means every 13 hours

But I don't know the meaning of 1 1/1 ? *.

Does the 1 mean "every day of the month"? Does the 1/1 mean each month of the year?

1

There are 1 best solutions below

7
Kusalananda On

See the crontab(5) manual:

A line in a user crontab file has the form

minute hour day-of-month month day-of-week command

Your line:

0 50 13 1 1/1 ? *

Your interpretation does not make sense, as there is no "seconds" field. The "hour" field is "50". This literally means "At time 50:00 on the 13th of January, if it's a Monday, run the command '? *'".

If this is using CronTrigger from Oracle, or Quartz Enterprise Job Scheduler (which seems to be the same thing), the line means "At 13:50:00, on the 1st of every month, any day of the week, every year".

The 1 1/1 means "the 1st of every month (starting at January)". Had it been 1 1/2 it would have meant "the 1st of every second month (starting at January)".

The final ? * means "any day of the week, every year".