Top "Scheduledexecutorservice" questions

A system library object that manages its own thread pool and can schedule actions to run on these threads (after a given delay or periodically).

How to run certain task every day at a particular time using ScheduledExecutorService?

I am trying to run a certain task everyday at 5 AM in the morning. So I decided to use ScheduledExecutorService …

java timertask background-thread scheduledexecutorservice
scheduleAtFixedRate vs scheduleWithFixedDelay

What's the main difference between scheduleAtFixedRate and scheduleWithFixedDelay methods of ScheduledExecutorService? scheduler.scheduleAtFixedRate(new Runnable() { @Override public void run() { System.…

java scheduled-tasks scheduledexecutorservice
How to remove a task from ScheduledExecutorService?

I have a ScheduledExecutorService that times a few different task periodically with scheduleAtFixedRate(Runnable, INIT_DELAY, ACTION_DELAY, TimeUnit.SECONDS); …

java android scheduledexecutorservice
How to run a background task in a servlet based web application?

I'm using Java and I want to keep a servlet continuously running in my application, but I'm not getting how …

multithreading jakarta-ee servlets background-process scheduledexecutorservice
How do I schedule a task to run once?

I want to delay doing something, along the lines of setting a countdown timer that will "do a thing" after …

java scheduled-tasks scheduledexecutorservice
Where do I create and use ScheduledThreadPoolExecutor, TimerTask, or Handler?

I need to make my RSS Feed reader check the feed every 10 minutes for new posts, and then parse them …

android handler threadpool timertask scheduledexecutorservice
ScheduledExecutorService one thread many tasks

I am new to ExecutorService and wonder why following code prints correctly "10 15", even though I have created only one thread …

java multithreading timer executorservice scheduledexecutorservice
Thread.sleep() VS Executor.scheduleWithFixedDelay()

Goal: Execute certain code every once in a while. Question: In terms of performance, is there a significant difference between: …

java multithreading thread-sleep scheduledexecutorservice
How to return value with ScheduledExecutorService?

I use ScheduledExecutorService and I want it to do some calculation every 10 seconds for a minute and after that minute …

java android time timer scheduledexecutorservice
Which is Better ScheduledExecutorService or AlarmManager in android?

I am a beginner and I am developing an android application which will keep on sending SMS to the user …

android alarmmanager scheduledexecutorservice