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

@app.task('daily.at("21:00") before Friday') #191

Open
faulander opened this issue Feb 9, 2023 · 1 comment
Open

@app.task('daily.at("21:00") before Friday') #191

faulander opened this issue Feb 9, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@faulander
Copy link

Describe the bug
above statements results in rocketry.parse.utils.exception.ParserError: Could not find parser for string 'daily.at'.
To Reproduce
Steps to reproduce the behavior.

Expected behavior
Statement should run every MO,TUE,WED,THUR,FRI at 21:00

Desktop (please complete the following information):

  • OS: Linux
  • Python version: 3.8
@faulander faulander added the bug Something isn't working label Feb 9, 2023
@carlosporta
Copy link

carlosporta commented Feb 9, 2023

You are not using the starting condition correctly. daily.at must be a function not a string.

from rocketry import Rocketry
from rocketry.conds import daily, weekly

app = Rocketry()

@app.task(daily.at('21:00') & weekly.before('Friday'))
def do_daily():
    print('hi')

if __name__ == '__main__':
    app.run()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants