airflow-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel Huang (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (AIRFLOW-1328) Daily DAG execute the past day
Date Tue, 20 Jun 2017 19:09:00 GMT

    [ https://issues.apache.org/jira/browse/AIRFLOW-1328?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16056292#comment-16056292
] 

Daniel Huang commented on AIRFLOW-1328:
---------------------------------------

>From the [docs|https://airflow.incubator.apache.org/scheduler.html]:

{quote}Note that if you run a DAG on a schedule_interval of one day, the run stamped 2016-01-01
will be trigger soon after 2016-01-01T23:59. In other words, the job instance is started once
the period it covers has ended.

Let’s Repeat That The scheduler runs your job one schedule_interval AFTER the start date,
at the END of the period.

{quote}

This means in your case, the DAG with execution date 06-19T15:00:00 is not expected to run
until 06-20T07:00:00 (the next scheduled interval). 

> Daily DAG execute the past day
> ------------------------------
>
>                 Key: AIRFLOW-1328
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-1328
>             Project: Apache Airflow
>          Issue Type: Bug
>          Components: DagRun
>    Affects Versions: Airflow 1.8
>         Environment: debian jessie
>            Reporter: Pierre-Antoine Tible
>
> Hello,
> I'm running Airflow 1.8 under debian jessie. I installed it via pip.
> I am using the LocalScheduler with a Mysql.
> I made a simple DAG with a BashOperator for a daily task (two times) : 
> +_default_args = {
>     'owner': 'airflow',
>     'depends_on_past': False,
>     'start_date': datetime.now() - timedelta(days=1, seconds=6),
>     'email': ['XXX'],
>     'email_on_failure': True,
>     'email_on_retry': False,
>     'retries': 1,
>     'retry_delay': timedelta(minutes=5),
>     'execution_timeout': None,
>     #'catchup': False,
>     #'backfill': False,
>     # 'queue': 'bash_queue',
>     # 'pool': 'backfill',
>     # 'priority_weight': 10,
>     # 'end_date': datetime(2016, 1, 1),
> }
> dag = DAG('campaign-reminder', default_args=default_args, schedule_interval="0,0 7,15
* * *", concurrency=1, max_active_runs=1)
> dag.catchup = False
> t1 = BashOperator(
>     task_id='campaign-reminder',
>     bash_command='XXXX ',
>     dag=dag)_+
> I did it today, it works, but the execution date was "06-19T15:00:00", we are the 20th,
so it's one day behind the schedule.
> My first though was a mistake with the start_date, so I put a datetime() and it did the
same ...
> I don't understand why.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message