I'm running scheduler. Frankly, I'm a beginner in Airflow, so I have two 
terminal windows for airflow webserver and airflow scheduler, and launch python 
scripts in the third window. I do run "python path/to/script.py" command.

I've tried both creating DAG using globals() and storing a file into the dags 
folder. The first variant doesn't lead to a visible DAG in UI, and no DAG is 
launched. File creation is successful and later Airflow accepts the DAG from 
that file, it can be manually successfully launched, but I want to do that 
programmatically. It also seems that some time needs to pass before Airflow 
accepts the file from dags folder, but e.g. "sleep 30" command in python script 
doesn't help.

Thanks,

Alex

________________________________________
From: Daniel Standish <[email protected]>
Sent: Thursday, April 14, 2022 9:43 AM
To: [email protected]
Subject: Re: how to create and run DAG in Airflow 2?

Are you running the scheduler, and you want to trigger the dag for the 
scheduler to run?  Or are you trying to run the dag in a single process, 
without a scheduler, e.g. with `python /path/to/dagfile.py`?

Reply via email to