Hi, please can someone tell me, why i get an error for this rule?
I want to run the rule every 1st on every month one minute after midnight:
rule "CRON-Rule every 1st on every month"
when
Time cron "0 1 0 1 * *"
then
[ERROR] [e.internal.engine.RuleTriggerManager] - Cannot create timer for rule 'CRON-Rule every 1st on every month': CronExpression '0 1 0 1 * *' is invalid.
Could this be because of the last “*”? Should there be a “?” ??? I thought, ? and * is the same in a cron ?
Month is from 0 to 11, so it has to be 0/1 or only /1 ?
And why isn´t * for the “day of week”-field not working, only “?” ? It is described, that i can use both? I don´t understand the difference and the explanation.
I don’t write cron expressions very often. So, whenever I did, I got frustrated battling the syntax. I find that it’s quicker to use this tool than it is to read the docs, or debug my cron expression. Hope it helps.