pause

Definition

Pauses one or more DAGs. This command allows you to halt the execution of specified DAGs, disabling further task scheduling.

Use the –treat-dag-id-as-regex option to target multiple DAGs by treating the –dag-id as a regex.

Usage

$ airflow dags pause [-h] [-o table, json, yaml, plain] [-S SUBDIR]
                   [--treat-dag-id-as-regex] [-v] [-y]
                   dag_id

Arguments

Parameter Description

dag_id

The ID of the DAG

-S, --subdir

File or directory location for DAGs. Defaults to [AIRFLOW_HOME]/dags, where [AIRFLOW_HOME] is the value set for AIRFLOW_HOME config in airflow.cfg

--treat-dag-id-as-regex

If set, dag_id will be treated as regex instead of a string

-o, --output

Output format. Possible values: table, json, yaml, plain. Default: table

-h, --help

Print out the help manual for this command

-v, --verbose

Make logging output more verbose

-y, --yes

Do not prompt for confirmation

Examples

To pause a DAG, run:

$ airflow dags pause tutorial

Output example:

Dag: tutorial, paused: True
Found a mistake? Seleсt text and press Ctrl+Enter to report it