Jump to content

Auto logging requests with API


Dan Munns

Recommended Posts

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

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
  1. 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

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

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
×
×
  • Create New...