Aviv Oron
Aviv Oron

Reputation: 565

Schedule a continually airflow DAG run

Is there a way to run airflow DAG in a loop? When trying to create a cycle (connecting the last component to the upstream of the last one) I got "Cycle detected in DAG. Faulty task: ..." Generally, I have a short flow of 3 BashOperator components which i want to run continually (without any input-output pass from the last component to the first). Thanks!

Upvotes: 7

Views: 5233

Answers (2)

hgr
hgr

Reputation: 326

Check out the @continuous cron preset in the airflow version 2.7.3

Upvotes: 1

Him
Him

Reputation: 1639

You should be able to use the TriggerDagRunOperator to rerun the DAG after the last task is finished. Just put it after the last operator and make it trigger the same DAG.

Upvotes: 9

Related Questions