java - I need to execute a AsynckTask object 5 times with an interval of 2 minutes -
I should send an event every 2 minutes (how do I do this) I am using the Ascend Task Class to handle background work and want to use my object to execute 5 times with a 2 minute interval. I have seen the previous answer and use thread (), try the timer, and wait, but nothing worked for me. Please help people
private stable final scheduled ExeterService employee = Exporter. NewSingleThreadScheduledExecutor (); Some method of zero () {Runnable task = new Runnabal () {Public run with zero} {/ couple do ...}}}; Worker.schedule (work, 5, time unit SECONDS); ⋮}
or if you want to use the timer
You can view this post on Stackshowverflows
< / Div>
Comments
Post a Comment