AEM 6.1 Sling Jobs unscheduling
Hi I am trying to unschedule the sling jobs(Scheduled jobs) in aem 6.1 programmatically.
Its not working. I am using below method.
public void stopScheduledJob() {
Collection<ScheduledJobInfo> myJobs = jobManager.getScheduledJobs(TOPIC, 10, null); myJobs.foreach(sji -> sji.unschedule());
}
Please let me know, is there any other solution apart from this.
PS: I dont want to delete manually under /var/eventing/scheduled-jobs