devgonvarun opened a new issue, #62929:
URL: https://github.com/apache/airflow/issues/62929

   ### Apache Airflow version
   
   3.1.7
   
   ### If "Other Airflow 3 version" selected, which one?
   
   _No response_
   
   ### What happened?
   
   ["use_job_schedule" 
configuration](https://airflow.apache.org/docs/apache-airflow/stable/configurations-ref.html#use-job-schedule))
 as the documentation says should "Turn off scheduler use of cron intervals by 
setting this to False. DAGs submitted manually in the web UI or with 
trigger_dag will still run.". 
   
   However, setting this to "False" not only disables time based scheduling but 
also Assets based scheduling. 
   
   ### What you think should happen instead?
   
   This configuration should only affect time based scheduling as mentioned in 
the documentation. Asset based scheduling should not be affected. 
   
   Use Case: a Development environment with disabled time based scheduling, so 
that developers can develop their dags with the most freedom in this 
environment and when their dags are ready they can move them to higher (test 
and prod) environments with time based scheduling enabled. Because of 
"use_job_schedule" affecting both time and asset based scheduling, Asset based 
scheduling cannot be used in this environment.
   
   So this is a bug report on the intended behaviour of "use_job_schedule" 
based on the documentation OR request of a new configuration that decouples 
time and asset based scheduling from "use_job_schedule". 
   
   ### How to reproduce
   
   Start a new airflow instance with "use_job_schedule" set to False. You can 
also use the "AIRFLOW__SCHEDULER__USE_JOB_SCHEDULE" environment variable to set 
this. Then use the following minimal Asset based scheduling dag, manually 
create asset trigger from the Assets menu and you will observe that the dag 
does not get triggered. Now retry with "use_job_schedule" set to True and the 
dag will get triggered. 
   
   ```
   from airflow.sdk import dag, task, Asset
   import pendulum
   
   my_asset = Asset("asset")
   
   @task
   def trigger_on_asset_event():
       print("hello after asset event")
   
   @dag(
       start_date=pendulum.datetime(2025, 6, 29, tz="Europe/Berlin"),
       schedule=[my_asset],
   )
   def asset_scheduled_dag():
       trigger_on_asset_event()
   
   asset_scheduled_dag()
   ```
   
   ### Operating System
   
   Debian GNU/Linux 12 (bookworm)
   
   ### Versions of Apache Airflow Providers
   
   _No response_
   
   ### Deployment
   
   Official Apache Airflow Helm Chart
   
   ### Deployment details
   
   _No response_
   
   ### Anything else?
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [x] I agree to follow this project's [Code of 
Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to