I’m currently testing some Prefect 2 flows on my local machine. My flow has a daily schedule and it will collect data from a given source for that day. I’m using the following expression to determine what’s the current schedule interval start time:
context.get_run_context().start_time
However, sometimes I want to debug a specific day from the past and I don’t want to bother creating a new oneshot schedule just for this. So I’ve created a hacky mechanism where I use an environment variable that, if present, will override the start_time
from above with its value. It works, but I wanna know if there is an easier way to approach this kind of situation.
Is there?