I would like to write a CRON expression to only trigger on a weekday between the hours of 0800 and 1800 and once every 45 minutes. I thought I had solved this using this CRON expression but it doesn't seem to work. Any help welcome, thanks.
0 45 8,18 ? * 1-5
Welcome to the Atlassian Community!
You can try below cron expression for your use case, since you want to use an hour range, you should use - instead of , for hour field, so that it triggers only between that hour range(i.e between 8AM -6PM)
0 0/45 8-18 ? * MON-FRI *
I have put this in to see if it works - I will let you know
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Kieron Brent If my response was helpful, feel free to mark it as accepted; it can assist other users facing similar questions.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Kieron Brent , welcome to the community!
(Edited to correct the expression per @Kishan Sharma's answer [he's correct] for future reference by others, thx!)
Have you tried 0 0/45 8-18 ? * MON-FRI * ? Also, there are a couple of good sites I use for CRON expressions, crontab.guru and a Community page Constructing cron expressions for a filter expression. Hope these help!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I will let you know a little later if this has worked - Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
0 0/45 8-18 ? * MON-FRI * has indeed solved the problem thanks all
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.