diff --git a/airflow/config_templates/default_airflow.cfg b/airflow/config_templates/default_airflow.cfg index bb4ab208d7372..b572dbb2f76d0 100644 --- a/airflow/config_templates/default_airflow.cfg +++ b/airflow/config_templates/default_airflow.cfg @@ -488,6 +488,10 @@ max_threads = 2 authenticate = False +# Turn off scheduler use of cron intervals by setting this to False. +# DAGs submitted manually in the web UI or with trigger_dag will still run. +use_job_schedule = True + [ldap] # set this to ldaps://: uri = diff --git a/airflow/jobs.py b/airflow/jobs.py index 48e15f758de02..da1089d690b29 100644 --- a/airflow/jobs.py +++ b/airflow/jobs.py @@ -785,7 +785,7 @@ def create_dag_run(self, dag, session=None): for a DAG based on scheduling interval Returns DagRun if one is scheduled. Otherwise returns None. """ - if dag.schedule_interval: + if dag.schedule_interval and conf.getboolean('scheduler', 'USE_JOB_SCHEDULE'): active_runs = DagRun.find( dag_id=dag.dag_id, state=State.RUNNING,