Question

I wanted to clarify which of the below expressions are meant to execute the cron job every hour all the time? I have EXPRESSION_1 configured to run every hour but am noticing some weird behavior with the cron skipping the job for a few hours. Can someone clarify please

    EXPRESSION_1=0 0 * * * ?
    EXPRESSION_2=0 0/0 * * * ?
Was it helpful?

Solution

Your first expression looks correct and will execute every hour.

As your requirement is once per hour you could also use a quartz SimpleTrigger and avoid using a cron expression.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top