Skip to content

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