Reputation: 313
I often run into a scenario like this in my dags:
Is there an airflow way or a best practice to handle 1-off tasks that would only run once?
Upvotes: 0
Views: 59
Reputation: 15931
You can create a DAG that will run only one time as:
from airflow.models import DAG
dag = DAG(
dag_id='my_one_time_dag',
schedule_interval='@once'
)
Upvotes: 1