Skip to content

How to add edit the CronSchedule with python script (instead of webui)? #4628

Discussion options

You must be logged in to vote

Hi @mr-tester-william-lo ,

I am not understanding 100% so I'll just try to answer as best I can.

First, I just want to make sure you know that you can combine CronClocks and IntervalClocks to make a more complex schedule. You can do something like:

clock1   = clocks.IntervalClock(...)
clock2   = clocks.CronClock(...)

# the full schedule
schedule = Schedule(clocks=[clock1, clock2])

From my understanding, your Flow has a CronSchedule and you want to change to IntervalSchedule. All you need to do is change your weekday_schedule to the IntervalSchedule and re-register the flow for it to take effect.

schedule = IntervalSchedule(interval=timedelta(minutes=2))

with Flow("parent-flow", schedule=s…

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@kvnkho
Comment options

@mr-tester-william-lo
Comment options

@mr-tester-william-lo
Comment options

@zhen0
Comment options

@mr-tester-william-lo
Comment options

Answer selected by mr-tester-william-lo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants