Has anyone had trouble with a localized `CronClock` schedule skipping `Flow` runs, entirely?
d
Has anyone had trouble with a localized
CronClock
schedule skipping
Flow
runs, entirely?
We can a case where the deployment info looks like this:
Copy code
Created by
<mailto:jenkins-1a9e3ede-b815-471e-a97b-2697f1735023@sa.prefect.io|jenkins-1a9e3ede-b815-471e-a97b-2697f1735023@sa.prefect.io>
20 August 2021 3:34am
Prefect Core Version:
0.14.19
Schedule
At 01:00 PM, only on Monday and Thursday (PDT)
However, the Thursday run has been skipped the last two weeks.
Any ideas?
k
Hi @David McGuire, what does it look like in the UI? Do you see the scheduled runs?
d
Yeah, the Thursday runs are there
Copy code
esoteric-piculet
Created by
The Prefect Scheduler
Last State Message
[20 August 2021 3:34am]: Flow run scheduled.
backtest version
44
Scheduled to start
26 August 2021 1:00pm
Labels 
None
k
And the old Thursday runs that missed are not in the Dashboard?
d
Correct.
Goes Monday directly to my
Quick Run
Friday morning when I realize something is wrong.
k
Could you show me how it appears under the Flow Settings when you click Schedule?
d
Copy code
At 01:00 PM, only on Monday and Thursday (PDT)
Read-only
Copy code
This schedule was set in your Flow's code so it can't be modifed.

This schedule was created as a Cron clock with a value of 0 13 * * mon,thu

Visit the docs  to learn more about Cron clocks on Prefect schedules.
That enough?
Relevant runs:
Copy code
thistle-ferret
20 Aug 2021 7:41am
20 Aug 2021 7:42am
32 minutes, 31 seconds	
faithful-sambar
16 Aug 2021 1:00pm
16 Aug 2021 1:01pm
16 Aug 2021 4:18pm
3 hours, 16 minutes, 45 seconds	
encouraging-platypus
13 Aug 2021 9:32am
13 Aug 2021 9:33am
13 Aug 2021 11:32am
1 hour, 59 minutes, 1 second		
imaginary-quoll
9 Aug 2021 1:00pm
9 Aug 2021 1:00pm
9 Aug 2021 4:19pm
3 hours, 18 minutes, 11 seconds
Should be 9 Aug, 12 Aug, 16 Aug, 19 Aug
k
Yeah that helps. Can I see your code snippet for the schedule? This all looks good so far.
d
Copy code
# 1PM PDT/PST (as needed) every Monday and Thursday
CRON_SCHEDULE = "0 13 * * mon,thu"
dt_aware = pytz.timezone("America/Los_Angeles").localize(dt.datetime.now())

schedule = Schedule(clocks=[CronClock(CRON_SCHEDULE, start_date=dt_aware)])
k
Ok i’ll ask the team if there are any ideas one sec
👍 1
d
Any updates?
k
Unfortunately no ideas. Everything you showed seemed like it would work and we tested reading in the expression you gave through the code and the UI and it looked good. You seem to also see the future scheduled runs. The only thing I could advice is to use the GraphQL API to query for the missed runs, but I suspect they’ll just be missing. Would you like the query for that? I’ll also make a Flow with a schedule like the one you have but do monday and tuesday and see if it misses tomorrow.
d
No, don't bother.
I'm testing a theory that it has to do with concurrent deployments (the registration of the Flow with Prefect Cloud is automated on merge-to-master), so I'll be back later in the week with an update. Thanks!
k
Sorry about that, and will keep an eye out for your update.