/** * Trigger a XObject job (execute it now). * * @param object the wrapped XObject Job to be triggered * @return true on success, false on failure. */ public boolean triggerJob(Object object) { try { return triggerJob(retrieveBaseObject(object)); } catch (Exception e) { // we don't need to push the exception message in the context here // as it should already have been pushed by the throwing exception return false; } }
/** * Pause the given XObject job by pausing all of its current triggers. Can be called the same way as * {@link #scheduleJob(Object)} * * @param object the wrapped XObject Job to be paused * @return true on success, false on failure. */ public boolean pauseJob(Object object) { try { return pauseJob(retrieveBaseObject(object)); } catch (Exception e) { // we don't need to push the exception message in the context here // as it should already have been pushed by the throwing exception return false; } }
/** * Unschedule a XObject job by deleting it from the jobs table. Can be called the same way as * {@link #scheduleJob(Object)} * * @param object the wrapped XObject Job to be paused * @return true on success, false on failure. */ public boolean unscheduleJob(Object object) { try { return unscheduleJob(retrieveBaseObject(object)); } catch (Exception e) { // we don't need to push the exception message in the context here // as it should already have been pushed by the throwing exception return false; } }
/** * Give, for a XObject job in a {@link JobState#STATE_NORMAL} state, the previous date at which the job has been * executed, the fire time is not computed from the CRON expression, this method will return null if the . * * @param object the wrapped XObject for which to give the fire time * @return the date the job has been executed */ public Date getPreviousFireTime(Object object) { try { return getPreviousFireTime(retrieveBaseObject(object)); } catch (Exception e) { // we don't need to push the exception message in the context here // as it should already have been pushed by the throwing exception return null; } }
/** * Trigger a XObject job (execute it now). * * @param object the wrapped XObject Job to be triggered * @return true on success, false on failure. */ public boolean triggerJob(Object object) { try { return triggerJob(retrieveBaseObject(object)); } catch (Exception e) { // we don't need to push the exception message in the context here // as it should already have been pushed by the throwing exception return false; } }
/** * Resume a XObject job that is in a {@link JobState#STATE_PAUSED} state. Can be called the same way as * {@link #scheduleJob(Object)} * * @param object the wrapped XObject Job to be paused * @return true on success, false on failure. */ public boolean resumeJob(Object object) { try { return resumeJob(retrieveBaseObject(object)); } catch (Exception e) { // we don't need to push the exception message in the context here // as it should already have been pushed by the throwing exception return false; } }
/** * Give, for a XObject job in a {@link JobState#STATE_NORMAL} state, the previous date at which the job has been * executed, the fire time is not computed from the CRON expression, this method will return null if the . * * @param object the wrapped XObject for which to give the fire time * @return the date the job has been executed */ public Date getPreviousFireTime(Object object) { try { return getPreviousFireTime(retrieveBaseObject(object)); } catch (Exception e) { // we don't need to push the exception message in the context here // as it should already have been pushed by the throwing exception return null; } }
/** * Resume a XObject job that is in a {@link JobState#STATE_PAUSED} state. Can be called the same way as * {@link #scheduleJob(Object)} * * @param object the wrapped XObject Job to be paused * @return true on success, false on failure. */ public boolean resumeJob(Object object) { try { return resumeJob(retrieveBaseObject(object)); } catch (Exception e) { // we don't need to push the exception message in the context here // as it should already have been pushed by the throwing exception return false; } }
/** * Unschedule a XObject job by deleting it from the jobs table. Can be called the same way as * {@link #scheduleJob(Object)} * * @param object the wrapped XObject Job to be paused * @return true on success, false on failure. */ public boolean unscheduleJob(Object object) { try { return unscheduleJob(retrieveBaseObject(object)); } catch (Exception e) { // we don't need to push the exception message in the context here // as it should already have been pushed by the throwing exception return false; } }
/** * Pause the given XObject job by pausing all of its current triggers. Can be called the same way as * {@link #scheduleJob(Object)} * * @param object the wrapped XObject Job to be paused * @return true on success, false on failure. */ public boolean pauseJob(Object object) { try { return pauseJob(retrieveBaseObject(object)); } catch (Exception e) { // we don't need to push the exception message in the context here // as it should already have been pushed by the throwing exception return false; } }
/** * Give, for a XObject job in a {@link JobState#STATE_NORMAL} state, the next date at which the job will be * executed, according to its cron expression. Errors are returned in the context map. Can be called for example: * <code> #set($firetime = $xwiki.scheduler.getNextFireTime($job)) * #if (!$firetime || $firetime=="") #error($context.get("error") #else #info("Fire time : * $firetime") #end </code> * Where $job is an XObject, instance of the {@link SchedulerPlugin#XWIKI_JOB_CLASS} XClass * * @param object the wrapped XObject for which to give the fire date * @return the date the job will be executed */ public Date getNextFireTime(Object object) { try { return getNextFireTime(retrieveBaseObject(object)); } catch (Exception e) { // we don't need to push the exception message in the context here // as it should already have been pushed by the throwing exception return null; } }
/** * Give, for a XObject job in a {@link JobState#STATE_NORMAL} state, the next date at which the job will be * executed, according to its cron expression. Errors are returned in the context map. Can be called for example: * <code> #set($firetime = $xwiki.scheduler.getNextFireTime($job)) * #if (!$firetime || $firetime=="") #error($xcontext.get("error") #else #info("Fire time : * $firetime") #end </code> * Where $job is an XObject, instance of the {@link SchedulerPlugin#XWIKI_JOB_CLASS} XClass * * @param object the wrapped XObject for which to give the fire date * @return the date the job will be executed */ public Date getNextFireTime(Object object) { try { return getNextFireTime(retrieveBaseObject(object)); } catch (Exception e) { // we don't need to push the exception message in the context here // as it should already have been pushed by the throwing exception return null; } }
/** * Schedule the given XObject to be executed according to its parameters. Errors are returned in the context map. * Scheduling can be called for example: <code> #if($xwiki.scheduler.scheduleJob($job)!=true) * #error($xcontext.get("error") #else #info("Job scheduled") #end </code> * Where $job is an XObject, instance of the {@link SchedulerPlugin#XWIKI_JOB_CLASS} XClass * * @param object the XObject to be scheduled, an instance of the XClass XWiki.SchedulerJobClass * @return true on success, false on failure */ public boolean scheduleJob(Object object) { try { return scheduleJob(retrieveBaseObject(object)); } catch (Exception e) { // we don't need to push the exception message in the context here // as it should already have been pushed by the throwing exception return false; } }
/** * Schedule the given XObject to be executed according to its parameters. Errors are returned in the context map. * Scheduling can be called for example: <code> #if($xwiki.scheduler.scheduleJob($job)!=true) * #error($context.get("error") #else #info("Job scheduled") #end </code> * Where $job is an XObject, instance of the {@link SchedulerPlugin#XWIKI_JOB_CLASS} XClass * * @param object the XObject to be scheduled, an instance of the XClass XWiki.SchedulerJobClass * @return true on success, false on failure */ public boolean scheduleJob(Object object) { try { return scheduleJob(retrieveBaseObject(object)); } catch (Exception e) { // we don't need to push the exception message in the context here // as it should already have been pushed by the throwing exception return false; } }
public JobState getJobStatus(Object object) throws SchedulerException, SchedulerPluginException { return getProtectedPlugin().getJobStatus(retrieveBaseObject(object), this.context); }
public JobState getJobStatus(Object object) throws SchedulerException, SchedulerPluginException { return getProtectedPlugin().getJobStatus(retrieveBaseObject(object), this.context); }