In the dags listing \admin
I see my dag and the last run
column shows 2021-04-30 19:31
which is a run I triggered manually. But going to /admin/taskinstance/
it shows it actually ran on schedule at 2021-05-01 03:50
(according to the docs I expected it to show about 1 hour later, at 2021-05-01 04:50
which is what the database shows).
So what gives? Why does airflow not actually show the last run date in \admin
?
For reference, here's my dag definition:
ranking_generator = models.DAG(
dag_id="activity_ranking_generator",
schedule_interval="50 3 * * *",
start_date=datetime.datetime(2021, 4, 28),
catchup=False,
max_active_runs=1,
)
I got it, the date shown in the dag listing seems a day late. You can see it when you go to the task instances
(browse - task instances) listing, the execution date
is always 1 day before the start date
, it's the start date
that shows when it actually ran.. I'm guessing the execution date
(what is shown as Last run
in the dag listing) shows when it was scheduled and it executes 1 day after that date (it's a daily task) so that's why it seems wrong.. Had read about this but still got confused. Anyway, looks good now.