-
Notifications
You must be signed in to change notification settings - Fork 15
/
dag.py
27 lines (24 loc) · 807 Bytes
/
dag.py
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 datetime import datetime, timedelta
from airflow import DAG
from airflow.operators.bash_operator import BashOperator
from airflow.utils.dates import days_ago
default_args = {
'owner': 'airflow',
'start_date': datetime(2023, 12, 18),
'depends_on_past': False,
'email': ['[email protected]'],
'email_on_failure': False,
'email_on_retry': False,
'retries': 1,
'retry_delay': timedelta(minutes=5),
}
dag = DAG('fetch_cricket_stats',
default_args=default_args,
description='Runs an external Python script',
schedule_interval='@daily',
catchup=False)
with dag:
run_script_task = BashOperator(
task_id='run_script',
bash_command='python /home/airflow/gcs/dags/scripts/extract_and_push_gcs.py',
)