Search code examples
javaeclipsejobs

Cancel scheduled jobs with waiting status


I schedule a number of eclipse jobs with a jobmanager that allows me to run 4 jobs in parallel. I can cancel scheduled jobs with waiting status in the progress view but I cannot find any listeners that fire when this happens. Am I missing something, or is there an alternative approach to do this.


Solution

  • The IJobChangeListener done event Javadoc says:

    Notification that a job has completed execution, either due to cancelation, successful completion, or failure. The event status object indicates how the job finished, and the reason for failure, if applicable.

    You can add a IJobChangeListener to each job you submit, or you can add the listener to the IJobManager to be told about all Jobs.