新增高德key定时生成任务

This commit is contained in:
Jian Shen
2022-07-18 15:26:04 +08:00
parent 2831d41cb3
commit 90bdfe2404
5 changed files with 29 additions and 1 deletions
+16
View File
@@ -0,0 +1,16 @@
from airflow.operators.bash import BashOperator
import pendulum
from airflow import DAG
with DAG(
"amap_key_generate_dag",
# 每天运行
schedule_interval="0 2 * * *",
start_date=pendulum.datetime(2022, 7, 18, tz="Asia/Shanghai"),
catchup=True,
) as dag:
t1 = BashOperator(
task_id='amap_key_generate',
bash_command='python /opt/airflow/dags/repo/dags/business/business/amap_key_generate.py',
)
t1