java: remove current scheduled job in a class that implements IScheduledJob
- by ufk
Hi.
In the execution of the scheduled job itself i want to stop it from being executed again and again, how can i do so without having the string that i received when i created the job in the first place ?
public class UfkJob implements IScheduledJob {
public void execute(ISchedulingService service) {
if (...) {
/* here i want to remove the current running job */
}
}
I executed the job outside by using the commands:
ISchedulingService service = (ISchedulingService) getScope().getContext().getBean(ISchedulingService.BEAN_NAME);
service.addScheduledJobAfterDelay(5000,new UfkJob(),200);