Steve G Posted March 27, 2019 Share Posted March 27, 2019 Hi @Dan Munns, I've been able to replicate this, it looks like the day of week and day of month values in the expression are applied with an OR instead of an AND. I'm just looking into the cron package now to see if there's anything we can do about that, will let you know when I have an answer. Cheers, Steve Link to comment Share on other sites More sharing options...
Dan Munns Posted March 27, 2019 Author Share Posted March 27, 2019 @Steve G thanks Link to comment Share on other sites More sharing options...
Steve G Posted March 27, 2019 Share Posted March 27, 2019 Hi Dan, After looking at the code and re-reading the crontab specification, this is working as expected: http://pubs.opengroup.org/onlinepubs/7908799/xcu/crontab.html From the examples: Quote As an example of specifying the two types of days: 0 0 1,15 * 1 would run a command on the first and fifteenth of each month, as well as on every Monday. To specify days by only one field, the other field should be set to "*"; for example: 0 0 * * 1 would run a command only on Mondays. I may be able to add some extra logic in the tool to cater for your use case though. I'll let you know once I've come up with a solution. Cheers, Steve Link to comment Share on other sites More sharing options...
Dan Munns Posted March 27, 2019 Author Share Posted March 27, 2019 @Steve G ok thanks. The cron tester I used said it would work as I expected. I guess not all cron is created equal lol Link to comment Share on other sites More sharing options...
Steve G Posted March 27, 2019 Share Posted March 27, 2019 Hi @Dan Munns, That's done and released to Github . There's a new boolean property as part of the Schedule in the config: DayOfMonthANDDayOfWeek Setting this to false will use the existing crontab standard expression parser. Setting this to true will use the existing parser, but will also check to see if the day of week AND day of month both match before executing the API call. Let me know how you get on with this. Cheers, Steve Link to comment Share on other sites More sharing options...
Dan Munns Posted March 27, 2019 Author Share Posted March 27, 2019 @Steve G thanks a lot, very much appreciated. I'll have a test when I am back in the office tomorrow and let you know how I get on. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now