Skip to content

How to schedule tasks with different start_date in one dag? #428

Description

@pkexcellent

Hi, I want to schedule some tasks with different start_date in one dag, like this:

dag = DAG(dag_id = 'myjob', default_args=default_args)
#in default_args, 'start_date' is datetime(2015, 9, 1)
t1 = BashOperator(
     task_id = 't1',
     bash_command = "date",
     dag = dag) 

t2 = BashOperator(
     task_id = 't2',
     bash_command = "date",
     start_date = datetime(2015, 9, 1, 0, 30),
     dag = dag) 

t1.set_downstream(t2)

now my system date is 2015-09-19,
I use airflow scheduler -d myjob
t1 can run success, but t2 cannot be scheduled, why?
Thanks a lot!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions