Cron+ settings. * vs ? help please

I'm trying to keep things separate.

I've been pointed in the direction of cron+ and in the config line I saw this:

0 30 6 * * ? *

Digging I find this:

* Asterisks indicate that the cron expression matches for all values of the field. For example, "*" in the minute field means every minute

? Question marks are used to specify 'no specific value' and is allowed for the day-of-month and day-of-week fields. It is used instead of the asterisk (*) for leaving either day-of-month or day-of-week blank.

(My hand is up)
What's the difference?
I see the words, but their meaning is lost for me.

Free Online Cron Expression Generator and Describer - for output

and for explanation Scheduling tasks with Cron - Raspberry Pi Documentation

* means every.

? means don't care.

So when you have 10 in day-of-month AND * in day-of-week they contradict each other. Do you want the 10th? or every day of the week? It's a contradiction.

So in essence, the ? Says "I am not relevant, use the other values to make sense of the Cron schedule"


This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.