/** * Commits the edited scheduled job to the scheduler.<p> */ @Override public void actionCommit() { List<Throwable> errors = new ArrayList<Throwable>(); try { // schedule the edited job OpenCms.getScheduleManager().scheduleJob(getCms(), m_jobInfo); // update the XML configuration OpenCms.writeConfiguration(CmsSystemConfiguration.class); // refresh the list Map<?, ?> objects = (Map<?, ?>)getSettings().getListObject(); if (objects != null) { objects.remove(CmsSchedulerList.class.getName()); } } catch (Throwable t) { errors.add(t); } // set the list of errors to display when saving failed setCommitErrors(errors); }
/** * Writes a job to the configuration and reloads the table.<p> * * @param jobInfo the job bean * * @throws CmsException if something goes wrong */ private void writeChangedJob(CmsScheduledJobInfo jobInfo) throws CmsException { // schedule the edited job OpenCms.getScheduleManager().scheduleJob(A_CmsUI.getCmsObject(), jobInfo); // update the XML configuration OpenCms.writeConfiguration(CmsSystemConfiguration.class); reloadJobs(); }
try { CmsScheduledJobInfo job = m_configuredJobs.get(i); scheduleJob(adminCms, job); } catch (CmsSchedulerException e) {
@SuppressWarnings({"synthetic-access"}) public void buttonClick(ClickEvent event) { try { if (editPanel.trySaveToBean()) { OpenCms.getScheduleManager().scheduleJob(A_CmsUI.getCmsObject(), jobCopy); OpenCms.writeConfiguration(CmsSystemConfiguration.class); restoreMainView(); } } catch (CmsException e) { LOG.error(e.getLocalizedMessage(), e); CmsErrorDialog.showErrorDialog(e, new Runnable() { public void run() { restoreMainView(); } }); } }
try { CmsScheduledJobInfo job = (CmsScheduledJobInfo)m_configuredJobs.get(i); scheduleJob(adminCms, job); } catch (CmsSchedulerException e) {
listItem.getId()).clone(); job.setActive(activate); OpenCms.getScheduleManager().scheduleJob(getCms(), job); } catch (CmsException e) { throw new CmsRuntimeException(
OpenCms.getScheduleManager().scheduleJob(cmsAdmin, job);
job.setActive(true); try { OpenCms.getScheduleManager().scheduleJob(getCms(), job); job.setActive(false); try { OpenCms.getScheduleManager().scheduleJob(getCms(), job);
OpenCms.getScheduleManager().scheduleJob(cmsAdmin, job);
OpenCms.getScheduleManager().scheduleJob(cmsAdmin, job); return true;