I am updating the scheduler of my DAG on running time with a logic like this:
now = time.localtime()
sched_interval = '30 6 * * *' if now.tm_isdst else '30 7 * * *'
dag = DAG(
'my_dag',
default_args=args,
schedule_interval=sched_interval,
max_active_runs=1,
catchup=False)
The problem is: after DST, DAG will trigger twice since the scheduler will be updated for 1h more. How can I avoid running twice in this case? I am using AirFlow 1.9.
Thanks!