

My dag looks like above
My code for developing the dag is like this
from airflow import DAG
from airflow.operators import BashOperator
from datetime import datetime, timedelta
default_args = {
'owner': 'Vignesh',
'depends_on_past': False,
'start_date': datetime(2015, 6, 1),
'email': ['
air...@airflow.com'],
'email_on_failure': False,
'email_on_retry': False,
'retries': 1,
'retry_delay': timedelta(minutes=5),
}
dag = DAG('POC', default_args=default_args,
schedule_interval=timedelta(minutes=5))
run_this_first = BashOperator(task_id='Start',bash_command='python ~/airflow/initial_db.py', dag=dag)
for i in range(5):
t = BashOperator(task_id="Orders"+str(i), bash_command='python ~/airflow/process_db.py',dag=dag)
t.set_upstream(run_this_first)
As you can see I have given a time interval of five minutes for the next start of the same dag .I am running the tasks order0,order1,... concurrently after the execution of task Start
The problem here is the tasks are not following the time interval and running continuously
here is my cofing file sample
[core]
airflow_home = /home/perlzuser/airflow
dags_folder = /home/perlzuser/airflow/dags
base_log_folder = /home/perlzuser/airflow/logs
executor = LocalExecutor
sql_alchemy_conn = mysql://dbuser:xxx@localhost/airflow
parallelism = 30
load_examples = False
plugins_folder = /home/perlzuser/airflow/plugins
[webserver]
base_url =
http://localhost:8080 web_server_host = 0.0.0.0
web_server_port = 8080
secret_key = temporary_key
expose_config = true
[smtp]
smtp_host = localhost
smtp_starttls = True
smtp_user = airflow
smtp_port = 25
smtp_password = airflow
smtp_mail_from =
air...@airflow.com [celery]
celery_app_name = airflow.executors.celery_executor
celeryd_concurrency = 16
worker_log_server_port = 8793
broker_url = sqla+mysql://airflow:airflow@localhost:3306/airflow
celery_result_backend = db+mysql://airflow:airflow@localhost:3306/airflow
flower_port = 8383
default_queue = default
[scheduler]
job_heartbeat_sec = 5
scheduler_heartbeat_sec = 5
From my task timing picture it is clear that the tasks are running randomly with out any interval
I scheduled it using `airflow scheduler`
and I would like to send mail to receipt when there is failure of a task I was not able to find any sample code fro that could you possibly link a code and show where it should be added
Thanks and very sorry if it is a simple or bad question and again thanks for your time cheers