apache airflow execution date has microseconds

Viewed 937

I have been deploying my DAGs with the default settings, but sometimes the DAG gets out of sync and starts running with a weird execution date such as 11-21T11:12:33.877171 but all but other runs have the execution date with the format MM-DDT00:00:00

I have not set the schedule interval so it uses the default:

schedule_interval=datetime.timedelta(1)

I also always set my start date to be a datetime such as:

'start_date': datetime(2017, 9, 6)

Once the first run happens with the new weird execution date then all the subsequent runs run one schedule interval after that execution date instead of at midnight like I would like.

Also, sometimes this issue also happens when I deploy a new DAG and the first execution date is not MM-DDT00:00:00

I have two questions:

  1. If the execution date gets messed up how do I fix it so that it goes back to the normal schedule of starting right after midnight ?
  2. When I deploy a new DAG how can I ensure that it starts right after midnight ?
0 Answers
Related