diff --git a/prefect.yaml b/prefect.yaml index 3a55074..5d6b33a 100644 --- a/prefect.yaml +++ b/prefect.yaml @@ -16,10 +16,7 @@ deployments: - feishu - channel-inventory-sync schedules: - - cron: "15 9 * * *" - timezone: "Asia/Shanghai" - active: true - - cron: "15 19 * * *" + - cron: "15 9,19 * * *" timezone: "Asia/Shanghai" active: true work_pool: @@ -39,10 +36,7 @@ deployments: - feishu - batch-inventory-report schedules: - - cron: "15 9 * * *" - timezone: "Asia/Shanghai" - active: true - - cron: "15 19 * * *" + - cron: "15 9,19 * * *" timezone: "Asia/Shanghai" active: true work_pool: diff --git a/prefect_inventory_scheduler.py b/prefect_inventory_scheduler.py index b718650..2728227 100644 --- a/prefect_inventory_scheduler.py +++ b/prefect_inventory_scheduler.py @@ -155,14 +155,14 @@ def main() -> None: if args.serve_channel_inventory_sync: inventory_channel_inventory_sync_flow.serve( name="channel-inventory-sync-0915-1915", - cron=("15 9 * * *", "15 19 * * *"), + cron="15 9,19 * * *", tags=["inventory", "feishu", "channel-inventory-sync"], ) return if args.serve_batch_inventory_report: inventory_batch_inventory_report_flow.serve( name="batch-inventory-report-0915-1915", - cron=("15 9 * * *", "15 19 * * *"), + cron="15 9,19 * * *", parameters=flow_kwargs, tags=["inventory", "feishu", "batch-inventory-report"], )