torxx666
torxx666

Reputation: 31

Airflow limit daily trigger

there is a "natural" ( I mean thought parameter) way to limit the number of triggering a dag (let say every 24 hours). I don't want to schedule it, but some user can trigger the same dag multiple time, and for resources and others reason, I want it only once . As I see "depends_on_past" depend only against the previous run, but it could be many time a day. Thx

Upvotes: 0

Views: 303

Answers (1)

Jarek Potiuk
Jarek Potiuk

Reputation: 20067

Not directly, but you could likely implement task_instance_mutation_hook in the first task of the DAG, it could then immediately fail the task if you check if it's been run several times the same day.

https://airflow.apache.org/docs/apache-airflow/stable/concepts/cluster-policies.html#task-instance-mutation

Upvotes: 1

Related Questions