-
Notifications
You must be signed in to change notification settings - Fork 53
Expand file tree
/
Copy pathdags.py.example
More file actions
26 lines (23 loc) · 807 Bytes
/
dags.py.example
File metadata and controls
26 lines (23 loc) · 807 Bytes
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
from airflow import DAG
from airflow.operators.bash import BashOperator
from datetime import datetime, timedelta
default_args = {
'owner': 'airflow',
'depends_on_past': False,
'email_on_failure': False,
'email_on_retry': False,
'retries': 1,
'retry_delay': timedelta(minutes=5),
}
with DAG(
'automate_haxunit',
default_args=default_args,
description='HaxUnit example.com - Report results to slack',
schedule_interval="0 0 * * *", # at midnight every day
start_date=datetime(2024, 1, 1),
catchup=False,
) as HaxUnit:
run_haxunit_example_com = BashOperator(
task_id='run_haxunit_example_com',
bash_command='docker exec -it haxunit python3 main.py -d example.com --cloud-upload -y --use-notify -m extensive',
)