Hello,

On Mon, Jul 2, 2018 at 3:41 PM, Simone Bordet <[email protected]> wrote:

> On Tue, Jun 19, 2018 at 4:35 PM Josh Spiegel <[email protected]> wrote:
> >
> > I am using Jetty and I would like to create a background task that
> periodically wakes up and checks on some cached state, possibly doing some
> cleanup.  I see several ways to do this but I am not sure what the best
> practice is.  One idea is to use Jetty's scheduler service (i.e. schedule
> the task to wake up and have it continuously reschedule itself when it is
> done).  Does anybody know if this is a reasonable approach?
>
> Yes it is.
> It has the added benefit that its lifecycle will be bound to that of
> Jetty and you don't have to write shutdown code for your own thread.
>


are you discussing the

https://www.eclipse.org/jetty/javadoc/current/org/eclipse/jetty/util/thread/ScheduledExecutorScheduler.html
?

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

Regards
Alex
_______________________________________________
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