Miksus / rocketry

Modern scheduling library for Python
https://rocketry.readthedocs.io
MIT License
3.25k stars 105 forks source link

ENH: Multiple values to at/on in cond API #114

Open Miksus opened 1 year ago

Miksus commented 1 year ago

This PR makes this possible:

from rocketry.conds import daily, weekly

@app.task(daily.at("12:00", "18:00"))
def do_daily_twice():
    ... # Condition translates to: daily.at("12:00") | daily.at("18:00")

@app.task(weekly.on("Mon", "Fri"))
def do_weekly_twice():
    ... # Condition translates to: weekly.on("Mon") | weekly.on("Fri")