Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

if you take it as a boolean test it makes sense. it will be true for any timepoint that is after ten and is either on monday or saturday


Yep, exactly. Rocketry works on conditions which are either true or false thus you need to give it a time range.

Points in time do not actually make much sense in terms of scheduling as nothing can be run exactly at specified point. There should always be some buffer of tolerance. I think Cron has a tolerance of a minute or so and in Rocketry the tolerance is made obvious and completely customized.

For those interested more about those two types of time conditions. "time_of_..." are conditions that check whether the current time is in the specified range. The "secondly", "minutely", "hourly", "daily" etc. also check that current time is as specified but also that the task did not yet run on the interval. By combining the two you can create quite complex scheduling strategies easily.


It would simplify things a little if the weekly.on accepted multiple days, so you could reduce it to one call:

    weekly.on("Mon", "Sat")


That's a great idea actually. Thanks, I think that should be pretty easy to do!




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: