allebacco commented on PR #35337:
URL: https://github.com/apache/airflow/pull/35337#issuecomment-1801676220
I like the idea of scheduling with multiple CRON expressions, but I think
that instead of supporting list of CRON expressions in the `schedule` argument,
we should create a new `Timetable` implementation that should be used like:
```python
@dag(
start_date=pendulum.datetime(2023, 11, 1),
schedule=MultiCronExpressionTimetable(["*/20 3 5 * *", "0 12 * *
MON,TUE"]),
catchup=False,
)
def multicron_test_dag():
...
```
With this approach, we aren't changing the current APIs. We could add the
new Timetable as _experimental_ and then we could remove it, refactor it or
promote it to stable in the future without affecting the APIs of the `DAG`
class. I think that this is the reason for which Timetables have been created.
Moreover, creating a new Timetable means that only a very small amount of
code will be affected: the testing and code review will be easier. A bug in the
current implementation will almost all the timetables and, I think, all the
Airflow users.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]