https://prefect.io logo
#prefect-server
Title
# prefect-server
m

Michael Hadorn

02/22/2021, 9:14 AM
Hi there If I skipped some schedules in the backend, can I replan them? Even if I recreate the schedule with an other time (cron, daily) it will no recreate the skipped schedules...
d

Dylan

02/22/2021, 3:03 PM
Hi @Michael Hadorn! Let me see if I can help =]. Do you mean that you’re skipping scheduled Flow Runs? Or that you’re setting a schedule to active or inactive? If you skip a scheduled Flow Run, you’ll need to manually create a new run to replace it if you do want it to run.
m

Michael Hadorn

02/22/2021, 3:10 PM
Hi @Dylan I canceled a schedule flow run by mistake. Ah ok, there is no other way? At this point it's not terrible (was on development) but if it happens on PRD, it's not that cool, to recreate manually schedules till the ordinary schedules takes over again. Only to be clear: • I have a schedule that creates planned flow runs • i canceled one from the future • now I can not automatically let them recreate (e.g. drop the schedule and recreate) ◦ or put the state of the canceled flow run back to scheduled?
d

Dylan

02/22/2021, 3:12 PM
Let me make sure we’re saying the same thing =]
You can absolutely recreate Schedules
If you remove a schedule from a Flow, you can create an identical one from the UI and it will behave as expected
If you cancel a specific Flow Run set for the future, Prefect won’t automatically schedule a new Flow Run for that time
You could try turning the schedule off and on again (no seriously, this might work) because that deletes the future runs in the Prefect Cloud db and re-creates them
You can change the state of the cancelled flow run (with a scheduled start time still in the future) and change its state to scheduled
At that point Prefect will run it on time as normal 👍
m

Michael Hadorn

02/22/2021, 3:18 PM
thx for clarify ^^ btw: I use prefect 0.14.6 and I use the local backend I tried all this but it's not working. all the time the new schedules will be planned after my canceled one (even if i recreate an schedule planned on a other time). If i put the state of an canceled to scheduled it was run immediately. I had daily flow runs planned: • 1,2,3,4,... • canceled 1,2 => 3,4 still there • I deleted the schedule • no scheduled flow runs • recreated the schedule • 3,4 showing up again (1,2 not) then i think this is an issue. Or did i mess something up? 😅
d

Dylan

02/22/2021, 3:20 PM
Nope, I believe this is all intentional, I just forgot a few specifics 😄
If you manually cancel a run in the future, Prefect takes steps to make sure that run won’t happen even if you turn the schedule on and off
Changing the state in the UI to “Scheduled” shouldn’t have an immediate impact unless the “Scheduled Start Time” is now or in the past
In which case, the run should be picked up immediately
Also remember
You can have more than one Flow Run at the same time for a Flow
m

Michael Hadorn

02/22/2021, 3:22 PM
d

Dylan

02/22/2021, 3:23 PM
So if you manually cancel 1,2, you can just use the UI to create totally new Flow Runs with identical parameters & start times, and they’ll run
Even if you have a cancelled Flow Runs occurring at the same time
In the future, if you don’t want some runs to happen during testing etc, I’d turn off the schedule instead of cancelling individual runs
m

Michael Hadorn

02/22/2021, 3:28 PM
thx a lot for you help! ok, so i can not delete a schedule and recreate a new one, like there was no schedule ever before? If this is the case, i think it is a little mysteriously... delete schedules should never have an impact... also not canceled flow runs on new schedules. or I still didn't understand 😕
d

Dylan

02/22/2021, 3:35 PM
If you delete a schedule and then create an identical one, it should schedule future Flow Runs like there was no schedule previously
If you simply turn a schedule off and back on again, it should “remember” the spots that you manually cancelled. At which point, you can create duplicate Flow Runs or set those Flow Runs to scheduled
d

Dylan

02/22/2021, 4:35 PM
Can you open an issue with all of the details you can? Including: 1. screenshots 2. steps to reproduce 3. the behavior you expected 4. the behavior that occurred
This sounds like suboptimal behavior, but without seeing exactly what you are it’s hard to know for sure
m

Michael Hadorn

02/24/2021, 7:57 AM
yes i will add it there. thx you a lot for your support! It's really awesome how you respond everywhere
d

Dylan

02/24/2021, 2:38 PM
Thank you @Michael Hadorn! This is a high quality issue 💯 We appreciate you taking the time to help us make Prefect even better
2 Views