Was there decision made not to have a "at" keyword for Rocketry? #71
Replies: 1 comment
-
The definition of "at" was quite unclear for sometime for me. I mean, I know what it means but saying "run daily at 10 (10 a.m.)" is not that straightforward regarding to when that should end. Ideally it would be exactly at that time but you'll always miss if you aim to do something precisely at 10:00:00.0000. And does 10:10 still be "at 10", or 10:59? However, saying that you will do something on Monday is trivial: it means any time on Monday is accepted. But I think I sorted this out and thought that "at 10" also includes 10:59.9999 but not 11:00.0000. You can always further specify it using AND operator (with time_of_hour and time_of_minute). I'm also currently reworking the time mechanisms behind the background (does not change anything for the user of the library if you don't use the undocumented time periods directly) and solidifying the underlying mechanics as required for implementing the Crontab condition the right way. After that I think we could include the alias "at" for "on" and it should be properly documented as well. The time period mechanics are one of the most complex part of the library as there are a lot of nuances related, it must work correctly and natural language is sometimes vague related to these things. I'm on phone thus sorry if the answer is a bit unclear. The answer is that I think we should have that as alias for "on" and thanks for the idea! |
Beta Was this translation helpful? Give feedback.
-
I only ask as I was playing around with Rocketry and I expected
"Daily at 8"
ordaily.at("8")
to work.I saw there was a
on
keyword but from my tests that runs after the fact likeafter
does.Beta Was this translation helpful? Give feedback.
All reactions