How to execute a task every year in a web application automatically? Is the Timer class helpful for this? I also heard about Quartz? I registered in their page but it seems not to be free. Thank you for your help.
Quartz is definitely a good option, it is free and opensource and uses the Apache 2.0 License (you don't have to register to download). You can also simply use cron if you are in a *nix environment.
You can also use a java.util.Timer
but I would only do so if your use case is extremely trivial and you make sure you restart your Timer
correctly based on some type of persistence layer on startup of your web app.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With