I have a very simple dag which is supposed to run every Monday at 19:10. The dag is as follows:
from airflow.models import DAG
from airflow.utils.dates import days_ago
from airflow.operators.bash_operator import BashOperator
args = {'owner': 'AirFlow'}
with DAG(dag_id='schedule_test_weekly', default_args=args, schedule_interval="20 21 * * 1", tags=['Scheduler test'],
start_date=days_ago(2), catchup=False) as dag:
test_scheduler_health = BashOperator(task_id="test_test_weekly", bash_command="echo Hello World", dag=dag)
But, it does not trigger. If I change the schedule_interval
to schedule_interval="*/5 * * * *"
it will run every 5 minutes without a problem. But I can't have it run every Monday at the said time. I checked many guides and posts online. Most mention the executer should be LocalExecutor
and database connection should be set to postgres. I have these configs:
sql_alchemy_conn = postgresql+psycopg2://airflow:pass2@localhost:5432/airflow
sql_alchemy_pool_enabled = True
sql_alchemy_pool_size = 10
executor = LocalExecutor
I also used cronhub to check my cron schedule. I think it is correct. Am I missing anything or doing something wrong?