Search code examples
springscheduled-tasks

How to set scheduler task in spring to run every 1 minutes


now I have this configuration my my scheduler:

<task:scheduled ref="task" method="run" cron="0 45 22 * * *" />

when this task is executed ? and how I can change it to do this task every minute


Solution

  • This task is executed at 22:45:00 every day, every week, every month.

    To execute a task every minute, use

    0 * * * * *