KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have a task that I want to run at a fixed rate. However I also need the result of the task after each execution. Here is what I tried: The task class ScheduledWork implements Callable<String> { public String call() { //do the task and return the result as a String } } No I tried to use the ScheduledExecutorService to scheduled it. Turns out you cannot schedule a Callable at a fixed rate, only a Runnable can be done so. Please advise.
Tags (comma-separated)
Save Edits
Cancel