rocketry icon indicating copy to clipboard operation
rocketry copied to clipboard

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

Open faulander opened this issue 2 years ago • 1 comments

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 avatar Feb 09 '23 10:02 faulander

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

carlosporta avatar Feb 09 '23 13:02 carlosporta