Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[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

Merged
merged 1 commit into from
Jan 23, 2024

Conversation

alexandre-daubois
Copy link
Member

Fix #18949

scheduler.rst Outdated
}
}

If you want to use another method name than ``__invoke()``, you can specify it
Copy link
Contributor

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

Copy link
Member Author

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')]
Copy link
Contributor

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

Copy link
Member Author

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!

@javiereguiluz
Copy link
Member

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.

@javiereguiluz
Copy link
Member

Merged! Thanks a lot Alex.

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

Successfully merging this pull request may close these issues.

4 participants