How to schedule an Airflow Job to run on alternate days

Viewed 17

I have an Airflow Job which is running daily at the moment but I need to run it on alternate days. I want to know if this code will work correctly or if there is a better way to do it?

dag = DAG(  
        dag_name,
        default_args=default_args,
        dagrun_timeout=timedelta(hours=2),
        schedule_interval=timedelta(hours=48)
    )
1 Answers

I would use cron format, if you want to schedule the DAG to run every two days i would use:

schedule_interval='0 0 */2 * *'

enter image description here

Check this

Related