code: public synchronized CmsScheduledJobInfo unscheduleJob(CmsObject cms, String jobId)
      throws CmsRoleViolationException {
  
          if (OpenCms.getRunLevel() > OpenCms.RUNLEVEL_1_CORE_OBJECT) {
              // simple unit tests will have runlevel 1 and no CmsObject
              OpenCms.getRoleManager().checkRole(cms, CmsRole.WORKPLACE_MANAGER);
          }
  
          CmsScheduledJobInfo jobInfo = null;
          if (m_jobs.size() > 0) {
              // try to remove the job from the OpenCms list of jobs
              for (int i = (m_jobs.size() - 1); i >= 0; i--) {
                  CmsScheduledJobInfo job = m_jobs.get(i);
                  if (jobId.equals(job.getId())) {
                      m_jobs.remove(i);
                      if (jobInfo != null) {
                          LOG.error(Messages.get().getBundle().key(Messages.LOG_MULTIPLE_JOBS_FOUND_1, jobId));
                      }
                      jobInfo = job;
                  }
              }
          }
  
          if ((jobInfo != null) && jobInfo.isActive()) {
              // job currently active, remove it from the Quartz scheduler
              try {
                  // try to remove the job from Quartz
                  m_scheduler.unscheduleJob(new TriggerKey(jobId, Scheduler.DEFAULT_GROUP));
                  if (LOG.isDebugEnabled()) {
                      LOG.debug(Messages.get().getBundle().key(Messages.LOG_UNSCHEDULED_JOB_1, jobId));
                  }
              } catch (SchedulerException e) {
                  if (LOG.isDebugEnabled()) {
                      LOG.debug(Messages.get().getBundle().key(Messages.LOG_UNSCHEDULING_ERROR_1, jobId));
                  }
              }
          }
  
          return jobInfo;
      }
docs: Removes a currently scheduled job from the scheduler.<p>
  
  @param cms an OpenCms context object that must have been initialized with "Admin" permissions
  @param jobId the id of the job to unschedule, obtained with <code>{@link CmsScheduledJobInfo#getId()}</code>
  
  @return the <code>{@link CmsScheduledJobInfo}</code> of the sucessfully unscheduled job,
  or <code>null</code> if the job could not be unscheduled
  
  @throws CmsRoleViolationException if the user has insufficient role permissions