When you are implementing new functionality in Java, you may have to run a task in one of the following ways.
daily at 8.00AM.
after every 10 minutes.
only weekends.
once a month or year.
You need to use a scheduler to fulfil this requirement and you can select one of the following.