17 lines
448 B
Python
17 lines
448 B
Python
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(2023, 3, 11, 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
|