Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[scheduler] #AsPeriodicTask attribute is unclear #20349

Open
johndodev opened this issue Oct 25, 2024 · 0 comments
Open

[scheduler] #AsPeriodicTask attribute is unclear #20349

johndodev opened this issue Oct 25, 2024 · 0 comments

Comments

@johndodev
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants