Rom
Rom

Reputation: 111

Is there an option to create a DAG in airflow which triggers itself on every deployment?

I am trying to create a DAG which triggers itself on every deployment of my application code (the DAGs). I tried to assign start_date to now and schedule_interval to once, hoping it will start itself every time the DAG is built (hopefully, on every deployment):

dag_args = {
    'owner': 'airflow',
    'start_date': datetime.now(),
    'retries': 1,
    'email_on_retry': False,
    'catchup': True
}

But it doesn't do what I wish. (Tried chatchup=False as well)

Any ideas\suggestions? (I try to avoid triggering it externally)

Thanks,

Upvotes: 1

Views: 737

Answers (1)

kaxil
kaxil

Reputation: 18884

As of Airflow 1.10.9, that is currently not possible. You will have to externally trigger the DAG when deploying it.

Upvotes: 1

Related Questions