CRON-JOB with error

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 ?

I use d the cron maker from the docs and got this:
0 1 0 1 1/1 ? *

Hm, i changed mine to “0 1 0 1 * ?” and the error was gone.


Why 1/1 for the month? I think * would be ok?

On the other places i use * or ? without /1 ?

EDIT:
I saw, your cron has 7 places, i have only 6.

   0           1          0        1        *          ?
seconds --- minutes --- hours --- day --- month --- day of week

What is your additional 7th place?

Did you even try to read the documents? A lot of people spent their time to write those!

I have searched the web for cron and there i often saw cron-jobs with only 5 fields (without seconds). But never saw 7 fields…

But you are right, i haven´t looked into openhab docs, only google search…


Is the 7-digits cron job with 1/1 in month-field the same as my cron-job with * in month-field? Are both versions working the same?


Openhab Documentation gives me this link for further explanations:
http://www.quartz-scheduler.org/documentation/quartz-2.1.x/tutorials/tutorial-lesson-06

But with this information, the rule above

0 1 0 1 1/1 ? *

Would be wrong?

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.

https://www.freeformatter.com/cron-expression-generator-quartz.html#cronconverttotext

This is right, but i would like to understand what i´m doing or what my rules do.

Using cron job generator like https://www.crontab-generator.org/ should guide you set cron job correctly.