GitHub user enchant3dmango edited a comment on the discussion: Require help to 
get start date for a schedule

You should combine the `start_date` and `schedule_interval`.

Try this one:

```python
from datetime import datetime, timedelta
from airflow import DAG
from airflow.operators.dummy import DummyOperator

default_args = {
    'owner': 'airflow',
    'depends_on_past': False,
    'retries': 1,
    'retry_delay': timedelta(minutes=5),
}

with dag as DAG(
    'dagger',
    default_args=default_args,
    description='Run tasks daily at 3:30 PM and 4:30 PM',
    schedule_interval='30 15,16 * * *',
    start_date=datetime(2024, 12, 30), # If you want it to start tomorrow, set 
the start_date as D-1 bcoz you want the interval daily
    catchup=False,
):
    t1 = DummyOperator(
        task_id='tasker',
    )

    t2 = DummyOperator(
        task_id='tasker',
    )

    t1 >> t2
```

GitHub link: 
https://github.com/apache/airflow/discussions/44868#discussioncomment-11694534

----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to: [email protected]

Reply via email to