You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@airflow.apache.org by Audubon Technologies <au...@gmail.com> on 2016/06/09 18:11:10 UTC

new DAG runs 5 times

when I create a new DAG scheduled daily and manually start it from airflow
website it creates 5 jobs. The start_date is in the future and does not
depend on the past. How do I create a new DAG, start it from the website,
and only run one job ?

Re: new DAG runs 5 times

Posted by Chris Riccomini <cr...@apache.org>.
Open a JIRA, please.

On Thu, Jun 9, 2016 at 3:51 PM, Audubon Technologies <
audubon.technologies@gmail.com> wrote:

> version 1.6.2
> using celery, rabbitmq, mysql
>
> example:
>
> from airflow import DAG
> from airflow.operators import BashOperator
> from datetime import datetime, timedelta
> import json
> import sys
>
> one_day_ahead = datetime.combine(datetime.today() + timedelta(1),
> datetime.min.time())
> one_day_ahead = one_day_ahead.replace(hour=3, minute=31)
>
> default_args = {
>     'owner': 'airflow',
>     'depends_on_past': False,
>     'start_date': one_day_ahead,
>     'email': ['me@email.com'],
>     'email_on_failure': True,
>     'email_on_retry': False,
>     'retries': 1,
>     'retry_delay': timedelta(minutes=5),
> }
>
> dag = DAG('alpha', default_args=default_args , schedule_interval='15 6 * *
> *' )
>
> task = BashOperator(
>         task_id='alphaV2',
>         bash_command='sleep 10',
>         dag=dag)
>
>
> On Thu, Jun 9, 2016 at 4:33 PM, Chris Riccomini <cr...@apache.org>
> wrote:
>
> > Could you please open a JIRA, and post an example DAG that illustrates
> the
> > problem? Also, please say which version of Airflow you're running.
> >
> > On Thu, Jun 9, 2016 at 11:11 AM, Audubon Technologies <
> > audubon.technologies@gmail.com> wrote:
> >
> > > when I create a new DAG scheduled daily and manually start it from
> > airflow
> > > website it creates 5 jobs. The start_date is in the future and does not
> > > depend on the past. How do I create a new DAG, start it from the
> website,
> > > and only run one job ?
> > >
> >
>

Re: new DAG runs 5 times

Posted by Audubon Technologies <au...@gmail.com>.
version 1.6.2
using celery, rabbitmq, mysql

example:

from airflow import DAG
from airflow.operators import BashOperator
from datetime import datetime, timedelta
import json
import sys

one_day_ahead = datetime.combine(datetime.today() + timedelta(1),
datetime.min.time())
one_day_ahead = one_day_ahead.replace(hour=3, minute=31)

default_args = {
    'owner': 'airflow',
    'depends_on_past': False,
    'start_date': one_day_ahead,
    'email': ['me@email.com'],
    'email_on_failure': True,
    'email_on_retry': False,
    'retries': 1,
    'retry_delay': timedelta(minutes=5),
}

dag = DAG('alpha', default_args=default_args , schedule_interval='15 6 * *
*' )

task = BashOperator(
        task_id='alphaV2',
        bash_command='sleep 10',
        dag=dag)


On Thu, Jun 9, 2016 at 4:33 PM, Chris Riccomini <cr...@apache.org>
wrote:

> Could you please open a JIRA, and post an example DAG that illustrates the
> problem? Also, please say which version of Airflow you're running.
>
> On Thu, Jun 9, 2016 at 11:11 AM, Audubon Technologies <
> audubon.technologies@gmail.com> wrote:
>
> > when I create a new DAG scheduled daily and manually start it from
> airflow
> > website it creates 5 jobs. The start_date is in the future and does not
> > depend on the past. How do I create a new DAG, start it from the website,
> > and only run one job ?
> >
>

Re: new DAG runs 5 times

Posted by Chris Riccomini <cr...@apache.org>.
Could you please open a JIRA, and post an example DAG that illustrates the
problem? Also, please say which version of Airflow you're running.

On Thu, Jun 9, 2016 at 11:11 AM, Audubon Technologies <
audubon.technologies@gmail.com> wrote:

> when I create a new DAG scheduled daily and manually start it from airflow
> website it creates 5 jobs. The start_date is in the future and does not
> depend on the past. How do I create a new DAG, start it from the website,
> and only run one job ?
>