https://prefect.io logo
Title
n

Neil Natarajan

08/22/2022, 8:21 PM
In prefect 2.0 what is the migration path for running workflows on a simple interval schedule? I tried creating a deployment yaml and including a schedule like this
schedule:
  interval: 75
  timezone:
However the flow doesn't actually run and I see a bunch of
Scheduled
flow runs that eventually become
Late
j

Jeff Hale

08/22/2022, 8:35 PM
If they are getting scheduled but showing as late, that means the interval schedule is working. You just need an agent running for that work queue to pick up the runs.
n

Neil Natarajan

08/22/2022, 9:24 PM
I actually even ran
prefect start <queue-name>
and still flows are not being executed
they just get marked
Late
Do you have an example of a simple local 2.0 workflow that runs on an interval schedule
a

Anna Geller

08/22/2022, 11:16 PM
If you're using CLI, it's as easy as adding --interval 75 to your prefect deployment build command
the syntax to start an agent is:
prefect agent start -q queue_name
n

Neil Natarajan

08/23/2022, 12:09 PM
Actually it seems the correct command is
prefect agent start <queue name>
I tried this however the flows are still not being executed even though in the logs as I mentioned I see the agent started
My deployment file already has the schedule, the flow runs are even being displayed in the Orion UI as
Scheduled
they just never run and become
Late
Do you have an example of a flow running on an interval schedule I can look at
What version of prefect btw are you referencing, maybe I am on an older version (2.0.2)
j

Jeff Hale

08/23/2022, 12:40 PM
Ah, that’s it. Update to 2.1.1 and use
prefect agent start -q <queue name>
n

Neil Natarajan

08/23/2022, 2:30 PM
i upgraded prefect versions and suddenly my orion ui is glitching a lto
Can't view the deployments or create workflows from the ui anymore
The cli seems to be working fine so I am able to move forward but the UI no longer seeems to work as most button clicks result in 404 errors
j

Jeff Hale

08/23/2022, 4:27 PM
Hmm. Maybe try a hard refresh or logging out and in.
n

Neil Natarajan

08/23/2022, 4:49 PM
I tried deleting the ~/.prefect directory to reset things but the ui still appears blocked as I cannot click on any flow runs as I could previously. Button clicks are resulting in 404 errors
a

Anna Geller

08/23/2022, 8:00 PM
you can create a new fresh Conda virtual env and try it there, and also signing up for Cloud might help as it gives you fewer things to manage: https://app.prefect.cloud/