Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[Scheduler] [#AsPeriodicTask] attribute is unclear #20349

Copy link
Copy link
Closed
@johndodev

Description

@johndodev
Issue body actions

Hello,

I fail to understand what really happens when I use "#AsPeriodicTask" attribute, specifically without "from".

I think I recently discovered a "glitch" (though I might be misunderstanding something) :
When I use #[AsPeriodicTask('24 hours', from: '00:00')], it's trigered 1 time per day, at 00:00.
However, when I use #[AsPeriodicTask('23 hours', from: '00:00')], it's not truly every 23h, because the second trigger is never reached (it's obvious here, but can be less so with different parameters), so it's basically every 24h.

So the real question which bring me here is what happens when I don't specify the from, as in the documentation ?
Or, for example, with #[AsPeriodicTask('3 hours')], when does it actually triger ? Is it from the launch of the consume command ? And If I deploy every 2 hours (so stopping and relaunching the consume command), doest it never trigger ?
Why when I use the debug command, the "next run" is updated every time I use the command (it's like the next run will never actually happen) ?

I think it would merite a clarification in the doc !

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    SchedulerhasPRA Pull Request has already been submitted for this issue.A Pull Request has already been submitted for this issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.