Silencer310
Silencer310

Reputation: 1090

What type of Cron Schedule is this?

0 48 16 ? * MON-FRI

What is this? All the cron examples I see on the internet is minutes at the start. But this cron job runs Mon-Fri, every week at 16:48 hrs.

The 0 at the start and the ? throws me off here. This code is written in Java using quartz.

Upvotes: 0

Views: 120

Answers (1)

ottomeister
ottomeister

Reputation: 5828

You almost answered your own question. This is not an actual cron schedule. This is a Quartz schedule.

Quartz is guilty of using confusing terminology by referring to this as a "Cron Expression" (see http://www.quartz-scheduler.org/api/2.3.0/org/quartz/CronExpression.html). I suppose calling it a CronLikeExpression or an InspiredByCronExpression would have been too wordy.

You'll see from that JavaDoc page that the 0 at the beginning is the value of a seconds field and the ? in the day-of-month field means "any day of the month".

Upvotes: 1

Related Questions