Ruby Han Posted September 1, 2022 Share Posted September 1, 2022 Hello, I am trying to express "every 1st saturday of the month" for spy.jobs.schedule(). Referenced site: https://www.freeformatter.com/cron-expression-generator-quartz.html based on helper doc string but gave me an error as shown below. Thanks in advance for the help! Ruby Han Link to comment Share on other sites More sharing options...
Seeq Team Joe Reckamp Posted September 1, 2022 Seeq Team Share Posted September 1, 2022 (edited) Hi Ruby, This should work instead: spy.jobs.schedule('0 0 0 ? * 6#1 *') Edited September 1, 2022 by Joe Reckamp 1 Link to comment Share on other sites More sharing options...
Ruby Han Posted September 1, 2022 Author Share Posted September 1, 2022 Thank you for the quick response! To go one step further, how do I express "every 1st saturday of the month at 1am"? Link to comment Share on other sites More sharing options...
Seeq Team Joe Reckamp Posted September 1, 2022 Seeq Team Share Posted September 1, 2022 You just would change the third value to a 1: spy.jobs.schedule('0 0 1 ? * 6#1 *') Link to comment Share on other sites More sharing options...
Ruby Han Posted September 1, 2022 Author Share Posted September 1, 2022 Great, that work! Thanks! Link to comment Share on other sites More sharing options...
Ruby Han Posted September 1, 2022 Author Share Posted September 1, 2022 I'm receiving an error for scheduling every 1st sunday of the month. Link to comment Share on other sites More sharing options...
Seeq Team Chris Orr Posted September 1, 2022 Seeq Team Share Posted September 1, 2022 Ruby, Sunday is the 0th day of the week in the cron scheduler so: spy.jobs.schedule('0 0 1 ? * 0#1 *') Link to comment Share on other sites More sharing options...
Ruby Han Posted September 1, 2022 Author Share Posted September 1, 2022 Awesome, thank you! 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