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),
}
dag = 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,
)
task = DummyOperator(
task_id='t1',
dag=dag,
)
```
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]