CIOC
CIOC

Reputation: 1427

Recurrent job in an Eclipse plugin

Using the Eclipse Job class, it is possible to schedule a job to run certain amount of time after it is scheduled, like this:

Job job = getMyJob();
job.schedule(delayInMilliseconds);

This will run the job after the specified delay, is there a way to create a job that runs at a given hour of the day, everyday?, for example, I want to run a job at 5pm, everyday, so if Eclipse happens to be open at 5pm the job will run, if it is closed, then the job will be skipped that day and it will wait for the next day.

Is there a way to create this type of recurrent job?

Upvotes: 0

Views: 38

Answers (1)

greg-449
greg-449

Reputation: 111198

No, the Job API doesn't have anything like this.

You could use something like the scheduleAtFixedRate method of ScheduledExecutorService to schedule a Runnable to submit the job once a day.

Upvotes: 1

Related Questions