警告
本文最后更新于 2023-05-18,文中内容可能已过时。
airflow
允许为一个相同的 DAG
配置多个 schedule
1
2
3
4
5
6
7
8
9
10
11
12
|
from airflow.datasets import Dataset
with DAG(
dag_id = "pretrading.all.csv",
default_args = DEFAULT_ARGS,
# schedule = "35 08 * * 1-5",
schedule = [Dataset("*/5 * * * 1-5"), Dataset("9 18 * * 1-5")],
start_date = datetime(2023, 1, 1),
catchup = False,
dagrun_timeout = timedelta(seconds=60*3),
tags = ['pretrading', 'all.csv'],
) as dag:
|