Jump to content

Utilities/Current Day method returning the wrong day when request is logged using CRON scheduler


Recommended Posts

We have an integration call in one of our BPMs which checks what the day is, and, if it's Wednesday, then it adds a task.

The requests are logged using a CRON scheduler as per https://wiki.hornbill.com/index.php?title=API_Scheduler

The schedule is set like this: "CronSchedule": "0 0 0 ? * MON,TUE,WED,THU,FRI", which means that it runs at midnight of the each day.

 

 

 

 

image.png.abf1c91394420b954975d39587a9d18e.pngimage.thumb.png.17006489ef9c7c676d33931902819bac.png

 

 

It seems that since the clocks went forward/backwards/whatever they did in March, these tasks which should only show up on a Wednesday, now show up on a Thursday (yes, it's taken us this long to see this :D )

 

So, my question is, how do I either change the CRON schedule to run at maybe 2am rather than midnight OR, is there something in the integration call which will pick up the fact that we're using daylight savings time, and accurately tell me what the day is at midnight?

 

thanks

 

Link to comment
Share on other sites

HI @Steve Giller

I did come to the same conclusion and, like you, I don't really have any experience with CRON scheduling, but I'm going to try this schedule: 0 0 2 ? * MON,TUE,WED,THU,FRI *

 

For anyone else looking for CRON related stuff, this is a good resource: https://www.freeformatter.com/cron-expression-generator-quartz.html#

(I hope it's ok to add links here?!)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...