potiuk opened a new issue, #27399: URL: https://github.com/apache/airflow/issues/27399
### Discussed in https://github.com/apache/airflow/discussions/27398 <div type='discussions-op-text'> <sup>Originally posted by **AndrewTsao** October 25, 2022</sup> ### Apache Airflow version Other Airflow 2 version (please specify below) ### What happened My Airflow version 2.4.0. I use CronTriggerTimetable in my DAG. I find it lost one task occasionally. I inspected schedule log, It should be run at 2022-10-24T23:10:00.000+0800. BUT not run. ``` [2022-10-24T23:08:59.661+0800] {processor.py:768} INFO - DAG(s) dict_keys(['AFlow.ajob']) retrieved from /home/bob/airflow/dags/dag.py [2022-10-24T23:08:59.685+0800] {logging_mixin.py:117} INFO - [2022-10-24T23:08:59.684+0800] {dag.py:2573} INFO - Sync 1 DAGs [2022-10-24T23:08:59.710+0800] {logging_mixin.py:117} INFO - [2022-10-24T23:08:59.710+0800] {dag.py:3324} INFO - Setting next_dagrun for AFlow.ajob to 2022-10-24T15:10:00+00:00, run_after=2022-10-24T15:10:00+00:00 [2022-10-24T23:08:59.734+0800] {processor.py:178} INFO - Processing /home/bob/airflow/dags/dag.py took 0.351 seconds [2022-10-24T23:09:29.855+0800] {processor.py:156} INFO - Started process (PID=16329) to work on /home/bob/airflow/dags/dag.py [2022-10-24T23:09:29.856+0800] {processor.py:758} INFO - Processing file /home/bob/airflow/dags/dag.py for tasks to queue [2022-10-24T23:09:29.857+0800] {logging_mixin.py:117} INFO - [2022-10-24T23:09:29.857+0800] {dagbag.py:525} INFO - Filling up the DagBag from /home/bob/airflow/dags/dag.py [2022-10-24T23:09:29.946+0800] {processor.py:768} INFO - DAG(s) dict_keys(['AFlow.ajob']) retrieved from /home/bob/airflow/dags/dag.py [2022-10-24T23:09:29.969+0800] {logging_mixin.py:117} INFO - [2022-10-24T23:09:29.968+0800] {dag.py:2573} INFO - Sync 1 DAGs [2022-10-24T23:09:29.994+0800] {logging_mixin.py:117} INFO - [2022-10-24T23:09:29.994+0800] {dag.py:3324} INFO - Setting next_dagrun for AFlow.ajob to 2022-10-24T15:10:00+00:00, run_after=2022-10-24T15:10:00+00:00 [2022-10-24T23:09:30.178+0800] {processor.py:178} INFO - Processing /home/bob/airflow/dags/dag.py took 0.327 seconds [2022-10-24T23:10:00.368+0800] {processor.py:156} INFO - Started process (PID=16562) to work on /home/bob/airflow/dags/dag.py [2022-10-24T23:10:00.369+0800] {processor.py:758} INFO - Processing file /home/bob/airflow/dags/dag.py for tasks to queue [2022-10-24T23:10:00.370+0800] {logging_mixin.py:117} INFO - [2022-10-24T23:10:00.370+0800] {dagbag.py:525} INFO - Filling up the DagBag from /home/bob/airflow/dags/dag.py [2022-10-24T23:10:00.628+0800] {processor.py:768} INFO - DAG(s) dict_keys(['AFlow.ajob']) retrieved from /home/bob/airflow/dags/dag.py [2022-10-24T23:10:00.648+0800] {logging_mixin.py:117} INFO - [2022-10-24T23:10:00.647+0800] {dag.py:2573} INFO - Sync 1 DAGs [2022-10-24T23:10:00.670+0800] {logging_mixin.py:117} INFO - [2022-10-24T23:10:00.670+0800] {dag.py:3324} INFO - Setting next_dagrun for AFlow.ajob to 2022-10-25T15:10:00+00:00, run_after=2022-10-25T15:10:00+00:00 [2022-10-24T23:10:00.693+0800] {processor.py:178} INFO - Processing /home/bob/airflow/dags/dag.py took 0.331 seconds ``` ### What you think should happen instead I think it lost schedule infomation when reload dag file and reschedule dag. ### How to reproduce 1. Change airflow.cfg `ag_dir_list_interval = 10`. 2. Add DAG as follow, ```py from airflow import DAG from airflow.timetables.trigger import CronTriggerTimetable from airflow.decorators import task import pendulum as pl with DAG( dag_id = 'test-cron-2', # schedule_interval='10 23 * * 2-3', timetable=CronTriggerTimetable('* * * * *', timezone=pl.tz.get_local_timezone()), # At 01:00 on Wednesday start_date=pl.today().add(days=-21), tags=['example'], ) as dag1: @task def test(): print("run...") test() ```  In scheduler log, We can find on that point, scheduler is reloading dag file.  ### Operating System Centos 7.9 ### Versions of Apache Airflow Providers ``` airflow-code-editor 7.0.0 apache-airflow 2.4.0 apache-airflow-providers-celery 3.0.0 apache-airflow-providers-common-sql 1.1.0 apache-airflow-providers-ftp 3.1.0 apache-airflow-providers-http 4.0.0 apache-airflow-providers-imap 3.0.0 apache-airflow-providers-microsoft-psrp 2.0.0 apache-airflow-providers-microsoft-winrm 3.0.0 apache-airflow-providers-mysql 3.2.0 apache-airflow-providers-redis 3.0.0 apache-airflow-providers-samba 4.0.0 apache-airflow-providers-sftp 4.0.0 apache-airflow-providers-sqlite 3.2.0 apache-airflow-providers-ssh 3.1.0 ``` ### Deployment Virtualenv installation ### 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) </div> -- 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]
