Skip to content

Commit

Permalink
[AIRFLOW-3004] Add config disabling scheduler cron (apache#3899)
Browse files Browse the repository at this point in the history
  • Loading branch information
xales authored and wayne.morris committed Jul 29, 2019
1 parent ebbebf7 commit afb0008
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions airflow/config_templates/default_airflow.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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://<your.ldap.server>:<port>
uri =
Expand Down
2 changes: 1 addition & 1 deletion airflow/jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit afb0008

Please sign in to comment.