// 1. Retrieves the scheduler from the context.
Scheduler scheduler = (Scheduler) context.getAttribute(Constants.SCHEDULER);
// 2. Removes the scheduler from the context.
context.removeAttribute(Constants.SCHEDULER);
// 3. Stops the scheduler.
scheduler.stop();
}
}