DAG: JY_DAG ROOT: jy_task

schedule: 01 00 * * *


JY_DAG

Toggle wrap
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
from airflow.operators import BashOperator, DummyOperator
from airflow.models import DAG
from datetime import datetime, timedelta
import pendulum

local_tz = pendulum.timezone("Asia/Shanghai")
start_date = datetime(2021, 11, 15, tzinfo=local_tz)

args = {
    'owner': 'wusong',
    'start_date': start_date,

    'email_on_failure': False,
    'email_on_retry': False,
    'retries': 3,
    'retry_delay': timedelta(minutes=1),
}

dag = DAG(
    dag_id='JY_DAG',
    default_args=args,
    schedule_interval='01 00 * * *',
    dagrun_timeout=timedelta(minutes=200))

jy_task=BashOperator(task_id="jy_task",bash_command='cd /usr/local/airflow/dags/bi_etl/bi_project_airflow/project_common/;nohup python3 jiuyuang/jiuyang_data_deal_new.py &',dag=dag)

#yinlu_image_detial.set_downstream(yinlu_nka_image_detial)