Replies: 1 comment
-
Just read this briefly so far, but the question mark has s special meaning in croner (it's representing the value of initialization. Replace that with * to start with. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a project to try to translate Quartz Cron from a single statement into a array of upcoming dates and human readable translations. I have modified the croner library to be in a single JS file since I cannot import NVM or other Node.js components. I have accounted for most of the issues I have faced except one is bugging me and I can't seem to find out why. When I go to translate 'SAT-SUN' meaning only occur on Saturdays and Sundays, I also get the current day I run the script, aka if I run it on a Wednesday the first day is Wednesday, and then the pattern resumes as normal. I have tried to enable options of startAt to no avail and looked for other ways but just can't seem to understand why it is happening like this. My edited version is here . Can you help me?
Example Quartz Cron:
0 0 07-19/4 ? * SAT-SUN *
Every 4 hours, between 07:00 AM and 07:59 PM, Saturday through Sunday
Results from today's run:
"Thu Jul 20 2023 15:00:00 GMT-0500 (Central Daylight Time),Thu Jul 20 2023 19:00:00 GMT-0500 (Central Daylight Time),Sat Jul 22 2023 00:00:00 GMT-0500 (Central Daylight Time),Sat Jul 22 2023 07:00:00 GMT-0500 (Central Daylight Time),Sat Jul 22 2023 11:00:00 GMT-0500 (Central Daylight Time),Sat Jul 22 2023 15:00:00 GMT-0500 (Central Daylight Time),Sat Jul 22 2023 19:00:00 GMT-0500 (Central Daylight Time),Sun Jul 23 2023 07:00:00 GMT-0500 (Central Daylight Time),Sun Jul 23 2023 11:00:00 GMT-0500 (Central Daylight Time),Sun Jul 23 2023 15:00:00 GMT-0500 (Central Daylight Time),Sun Jul 23 2023 19:00:00 GMT-0500 (Central Daylight Time),Sat Jul 29 2023 00:00:00 GMT-0500 (Central Daylight Time),Sat Jul 29 2023 07:00:00 GMT-0500 (Central Daylight Time),Sat Jul 29 2023 11:00:00 GMT-0500 (Central Daylight Time),Sat Jul 29 2023 15:00:00 GMT-0500 (Central Daylight Time)"
Beta Was this translation helpful? Give feedback.
All reactions