| Start |
|---|
| Cron expression A Cron expression consists of six sequential fields - and is declared as follows We can also set the timezone (opens new window) as - Notes: - Example: - A method declared with If we want some code to be executed when a cron expression is met, then we have to specify it in the annotation: If we want to print current time in our console for every after 5 seconds - Example using XML configuration: Example class: Example XML(task-context.xml): |
| Enable Scheduling Spring provides a useful task scheduling support. To enable it, just annotate any of your |
| Fixed delay If we want some code to be executed periodically after the execution which was before is finished, we should use fixed delay (measured in milliseconds): |
| Fixed Rate If we want something to be executed periodically, this code will be triggered once per the value in milliseconds we specify: |
Read Article
https://develop.horje.com/learn/1434/reference