I want to run a function every hour, to email users a hourly screenshot of their progress. I code set up to do so in a function called sendScreenshot()
How can I run
According to this article by Oracle, it's also possible to use the @Schedule annotation:
@Schedule
@Schedule(hour = "*") public void doSomething() { System.out.println("hello world"); }
For example, seconds and minutes can have values 0-59, hours 0-23, months 1-12.
Further options are also described there.