You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2021/03/10 07:19:29 UTC

[GitHub] [airflow] gitzhuyongfu opened a new issue #14693: dags not run on my time

gitzhuyongfu opened a new issue #14693:
URL: https://github.com/apache/airflow/issues/14693


   the airflow client timezone is default_timezone = Asia/Shanghai and airflow.cfg set default_timezone = Asia/Shanghai
   the dags:
   from airflow import DAG
   from airflow.operators.python import PythonOperator
   from datetime import datetime, timedelta
   from airflow.utils.dates import days_ago
   from loguru import logger
   from datetime import datetime
   
   default_args = {
       'owner': 'airflow',
       'depends_on_past': False,
       'start_date': datetime(2021, 3, 10, 15, 12),
       'email': ['airflow@example.com'],
       'email_on_failure': False,
       'email_on_retry': False,
       'retries': 1,
       'retry_delay': timedelta(minutes=5),
       # 'queue': 'bash_queue',
       # 'pool': 'backfill',
       # 'priority_weight': 10,
       # 'end_date': datetime(2016, 1, 1),
   }
   
   with DAG(
       dag_id='test',
       default_args=default_args,
       schedule_interval= "13 15 * * *",
       tags=['example'],
   ) as dag:
       def test():
           print("-----------------------------")
           logger.info("2341214124321514")
           logger.debug('this is a debug message')
           print(datetime.now())
           print(12344)
           return 'Whatever you return gets printed in the logs'
       run_this = PythonOperator(
           task_id='print_the_context',
           python_callable=test,
       )
   
   ####notice
   the dags not run on "13 15 * * *"


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] jedcunningham commented on issue #14693: dags not run on my time

Posted by GitBox <gi...@apache.org>.
jedcunningham commented on issue #14693:
URL: https://github.com/apache/airflow/issues/14693#issuecomment-796911841


   @gitzhuyongfu, did you get a run at `2021-03-11 15:13`?


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] kaxil closed issue #14693: dags not run on my time

Posted by GitBox <gi...@apache.org>.
kaxil closed issue #14693:
URL: https://github.com/apache/airflow/issues/14693


   


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] jedcunningham commented on issue #14693: dags not run on my time

Posted by GitBox <gi...@apache.org>.
jedcunningham commented on issue #14693:
URL: https://github.com/apache/airflow/issues/14693#issuecomment-796287518


   With a start_date of `2021-03-10`, you won't see a scheduled run until `2021-03-11 15:13`. The reasoning is explained in more depth in the [DAG Runs](https://airflow.apache.org/docs/apache-airflow/stable/dag-run.html) docs, but the short version is the first scheduled run starts shortly after start_date + schedule_interval.


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] gitzhuyongfu commented on issue #14693: dags not run on my time

Posted by GitBox <gi...@apache.org>.
gitzhuyongfu commented on issue #14693:
URL: https://github.com/apache/airflow/issues/14693#issuecomment-797176437


   thanks,i have solved it ,With a start_date of 2021-03-10 ,the dags will run on 2021-03-11,then i know that it not like running on the linux cron.


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] gitzhuyongfu edited a comment on issue #14693: dags not run on my time

Posted by GitBox <gi...@apache.org>.
gitzhuyongfu edited a comment on issue #14693:
URL: https://github.com/apache/airflow/issues/14693#issuecomment-797176437


   @jedcunningham,thanks,i have solved it ,With a start_date of 2021-03-10 ,the dags will run on 2021-03-11,then i know that it not like running on the linux cron.


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org