Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENH: Multiple values to at/on (conditions) #115

Open
Miksus opened this issue Sep 25, 2022 · 0 comments · May be fixed by #114
Open

ENH: Multiple values to at/on (conditions) #115

Miksus opened this issue Sep 25, 2022 · 0 comments · May be fixed by #114
Labels
built-in Relates to the built-in tasks, conditions etc. enhancement New feature or request

Comments

@Miksus
Copy link
Owner

Miksus commented Sep 25, 2022

Describe the solution you'd like
It would be nice to do this:

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")

Describe alternatives you've considered
Use OR (|) but this gets tediuous.

@Miksus Miksus added enhancement New feature or request built-in Relates to the built-in tasks, conditions etc. labels Sep 25, 2022
@Miksus Miksus linked a pull request Sep 25, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
built-in Relates to the built-in tasks, conditions etc. enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant