Hi,

May I ask if the following dag definition code example in the document
<https://airflow.incubator.apache.org/scheduler.html> should use *@daily*
schedule_interval instead of *@hourly*.

"""
> Code that goes along with the Airflow tutorial located at:
>
> https://github.com/airbnb/airflow/blob/master/airflow/example_dags/tutorial.py
> """
> from airflow import DAG
> from airflow.operators.bash_operator import BashOperator
> from datetime import datetime, timedelta
> default_args = {
> 'owner': 'airflow',
> 'depends_on_past': False,
> 'start_date': datetime(2015, 12, 1),
> 'email': ['airf...@example.com'],
> 'email_on_failure': False,
> 'email_on_retry': False,
> 'retries': 1,
> 'retry_delay': timedelta(minutes=5),
> 'schedule_interval': '@hourly',
> }
> dag = DAG('tutorial', catchup=False, default_args=default_args)


Otherwise, the following explanation doesn't make sense to me:

> In the example above, if the DAG is picked up by the scheduler daemon on
> 2016-01-02 at 6 AM, (or from the command line), a single DAG Run will be
> created, with an execution_date of 2016-01-01, and the next one will be
> created just after midnight on the morning of 2016-01-03 with an execution
> date of 2016-01-02.


Thanks.

Cheers,
Kewei

Reply via email to