Wrong Timer Execution
Good morning ,
Let me make the issue clear , well I have a timer that should be executed from 28th to 2nd working day of each month (without considering weekends).
I made a certain logic to calculate business days and then used this CRON expression that I have built .
00 00 12 28,29,30,31,3,4 * ? * (3,4 are the business days of May ).
Logically, on the 1st and 2nd day of the month ( which are Saturday and Sunday) , the timer shouldn't be executed , but I got totally the opposite, I don't know what's going on in the background .
Can any one Help me with that
According to https://www.freeformatter.com/cron-expression-generator-quartz.html, your cron expression reads: "At 12:00:00pm, on the 28th, 29th, 30th, 31st, 3rd and 4th day, every month", which seems to correspond to your description.
That being said, can you check in your process that there is no negate operator somewhere that could explain the opposite values you observe!? For instance, the timer triggers and take the wrong branch in your process because of the boolean value of the transition on your branch...
Well I didn't understand the second part of your answer concerning the branch issue , but I don't know what's wrong with the execution on the 1st and 2nd day ( which are not included in the CRON expression) .
Other thing I wanna ask about , is there a way to make the process always watching the change of the day once it's deployed and execute the timer ? (because when I used that cron espression I ve already given above , it's executed on the wrong days).
And I wanna make a clarification about using a cycle and a fixed date , what's the difference between both of em ?
In Fact , i've used this cron expression for my timer 00 00 12 1,2,28,29,30,31 * ? * -> I want my process to be enabled from 28th of the month to the 2nd working day of the next month , but I've realised that this process has launched on production environment from 28th to 31th of May but it doesn't on the 1st and 2nd day of juin , I don't know what went wrong exactly ?
Actually,I thought about two things : Maybe I should have used this cron exp instead : 00 00 12 28,29,30,31,1,2 * ? *
Or this one maybe 00 00 12 28,29,30,31,01,02 * ? *
Do you have any idea about the issue ?