Skip to content

Commit 91c0dd2

Browse files
xalesAlice Berard
authored and
Alice Berard
committed
[AIRFLOW-3004] Add config disabling scheduler cron (apache#3899)
1 parent 0d9053d commit 91c0dd2

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

airflow/config_templates/default_airflow.cfg

+4
Original file line numberDiff line numberDiff line change
@@ -488,6 +488,10 @@ max_threads = 2
488488

489489
authenticate = False
490490

491+
# Turn off scheduler use of cron intervals by setting this to False.
492+
# DAGs submitted manually in the web UI or with trigger_dag will still run.
493+
use_job_schedule = True
494+
491495
[ldap]
492496
# set this to ldaps://<your.ldap.server>:<port>
493497
uri =

airflow/jobs.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -785,7 +785,7 @@ def create_dag_run(self, dag, session=None):
785785
for a DAG based on scheduling interval
786786
Returns DagRun if one is scheduled. Otherwise returns None.
787787
"""
788-
if dag.schedule_interval:
788+
if dag.schedule_interval and conf.getboolean('scheduler', 'USE_JOB_SCHEDULE'):
789789
active_runs = DagRun.find(
790790
dag_id=dag.dag_id,
791791
state=State.RUNNING,

0 commit comments

Comments
 (0)