-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
[Scheduler] Add AsCronTask
and AsPeriodicTask
#19444
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
Conversation
scheduler.rst
Outdated
} | ||
} | ||
|
||
If you want to use another method name than ``__invoke()``, you can specify it |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you should also document timezone
, jitter
, arguments
, schedule
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added some examples 🙂
|
||
use Symfony\Component\Scheduler\Attribute\AsPeriodicTask; | ||
|
||
#[AsPeriodicTask(frequency: '1 day', from: '2022-01-01', until: '2023-06-12')] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we talk about ?
frequency
can also be an int (from my understand it's for seconds)
from
can be nullable
until
can be nullable
jitter
schedule
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added some other as well!
b5bfafe
to
f019732
Compare
We've just merged #19292 (from Dec. 2023) that adds many things, including these two attributes. I'm going to merge this PR too and try to combine some ideas from it in the existing docs. Thanks. |
Merged! Thanks a lot Alex. |
Fix #18949