I have to create a cron job. I know the rules of cron but when I am using cron generator online, I can see that the resultant expressions have ? in the result. For example, if I am creating an cron expression for job to be called everyday at 4 am, the resultant expression is 0 0 4 ? * * *

What is the relevance of this ? in the cron expression?

1 Answer 1


The ? wildcard is only used in the day of month and day of week fields:

It means ? ("no specific value") - useful when you need to specify something in one of the two fields in which the character is allowed, but not the other. For example, if I want my trigger to fire on a particular day of the month (say, the 10th), but don't care what day of the week that happens to be, I would put "10" in the day-of-month field, and "?" in the day-of-week field.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .