Hi,

On Sun, Jul 22, 2018 at 5:00 PM Alexander Farber
<[email protected]> wrote:
> are you discussing the
>
> https://www.eclipse.org/jetty/javadoc/current/org/eclipse/jetty/util/thread/ScheduledExecutorScheduler.html
>  ?

Yes.

> It is difficult to find a usage example, for example for running a task every 
> hour...

The API is very similar to that of JDK's schedulers:

Scheduler scheduler = new ScheduledExecutorScheduler();
scheduler.start();

scheduler.schedule(() -> { ... }, 1, TimeUnit.HOURS);

If it needs to be recurring, you just call schedule() again from
within the task.

-- 
Simone Bordet
----
http://cometd.org
http://webtide.com
Developer advice, training, services and support
from the Jetty & CometD experts.
_______________________________________________
jetty-users mailing list
[email protected]
To change your delivery options, retrieve your password, or unsubscribe from 
this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users

Reply via email to