Airflow isn’t like crontab which just runs at a specific time. Airflow checks if it successfully ran a DAG between the current time and the last time it was due to be scheduled.
So in your example your start date is 2019-10-13 and your schedule is every day at 22:10, therefore when you start the DAG a DAG Run will be immediately kicked off at there should have been a scheduled run today (or yesterday) at 22:10. If you do not want this set your start date to the first DAG Run date you wish to occur(e.g. at time of writing 2019-10-23 would not run till “tomorrow”). From: Reed Villanueva [mailto:[email protected]] Sent: Wednesday, October 23, 2019 5:18 PM To: [email protected] Subject: How to stop airflow running dags (at unscheduled times) automatically when initially turned on? How to stop airflow running dags (at unscheduled times) automatically when initially turned on? My dags look like... default_args = { 'owner': 'rvillanueva', 'depends_on_past': False, 'start_date': datetime(2019, 10, 13), 'email': ['[email protected]<mailto:[email protected]>'], 'email_on_failure': True, # 'email_on_retry': False, 'retries': 0, 'retry_delay': timedelta(minutes=5), 'max_active_runs': 3, # 'queue': 'bash_queue', # 'pool': 'backfill', # 'priority_weight': 10, # 'end_date': datetime(2016, 1, 1), } dag = DAG('mydag', default_args=default_args, catchup=False, schedule_interval="10 22 * * *") ... I had thought that having depends_on_past=False or catchup=False would be enough to stop this, but dags are still running once right when they are turned on in the webserver UI (causing them end up overlapping runs on their actual scheduled times in some cases). Is there any way to stop this? This electronic message is intended only for the named recipient, and may contain information that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately by contacting the sender at the electronic mail address noted above, and delete and destroy all copies of this message. Thank you. =============================================================================== Please access the attached hyperlink for an important electronic communications disclaimer: http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html ===============================================================================
