gpt4 book ai didi

airflow - 安排 Airflow 在工作日运行

转载 作者:行者123 更新时间:2023-12-01 06:04:19 25 4
gpt4 key购买 nike

安排 Airflow Dag 使其仅在工作日运行的正确方法是什么?我已经尝试在 start_date 和 schedule_interval 表达式中都包含小时偏移量,但它仍然没有在所需的时间开始。 (我希望它在 UTC 时间 1 月 28 日凌晨 1 点开始,并在周二到周六的那个时间运行。)

default_args = {
'owner': 'me',
'depends_on_past': False,
'start_date': datetime.datetime(2017, 1, 28, 0, 0),
'email': ['me@myplace.com'],
'email_on_failure': True,
'email_on_retry': True,
'retries': 2,
'retry_delay': datetime.timedelta(minutes=60),
}

dag = DAG(
'tasks', default_args=default_args, schedule_interval="0 01 * * 2-6")

最佳答案

啊,我明白了。显然这被认为是 @daily 间隔,所以我需要将 start_date 设置为 27 日。

关于airflow - 安排 Airflow 在工作日运行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41905507/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com