Skip to content

run_at running immediately if start in past #2491

@dekiesel

Description

@dekiesel

What happened?

According to the documentation

If the time specified is in the past, the callback will occur the next day at the specified time.

A run with a time that lies in the past should be scheduled for the next day, but that doesn't seem to be the case.

Issue

It is 13:46 now.
When I schedule this run (one minute into the future) everything works as expected:
self.run_at(self.run_actions_cb, "13:47:00")
But when I schedule it one minute "too late"/one minute in the past it fires immediately
self.run_at(self.run_actions_cb, "13:45:00")

Am I misunderstanding the doc or should the second run be scheduled for tomorrow's 13:45?

Version

4.5.12

Installation type

Docker container

Relevant log output

Relevant code in the app or config file that caused the issue

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    issueSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions