public interface IScheduler
Modifier and Type | Interface and Description |
---|---|
static class |
IScheduler.SchedulerStatus |
Modifier and Type | Method and Description |
---|---|
void |
addListener(ISchedulerListener listener) |
Job |
createJob(String jobName,
Class<? extends org.pentaho.platform.api.action.IAction> action,
Map<String,Serializable> jobParams,
IJobTrigger trigger)
Schedules a job to be run at one or more times in the future.
|
Job |
createJob(String jobName,
Class<? extends org.pentaho.platform.api.action.IAction> action,
Map<String,Serializable> jobParams,
IJobTrigger trigger,
IBackgroundExecutionStreamProvider outputStreamProvider)
Schedules a job to be run at one or more times in the future.
|
Job |
createJob(String jobName,
String actionId,
Map<String,Serializable> jobParams,
IJobTrigger trigger)
Schedules a job to be run at one or more times in the future.
|
Job |
createJob(String jobName,
String actionId,
Map<String,Serializable> jobParams,
IJobTrigger trigger,
IBackgroundExecutionStreamProvider outputStreamProvider)
Schedules a job to be run at one or more times in the future.
|
void |
fireJobCompleted(org.pentaho.platform.api.action.IAction actionBean,
String actionUser,
Map<String,Serializable> params,
IBackgroundExecutionStreamProvider streamProvider)
Not intended for public use.
|
Map<IScheduleSubject,ComplexJobTrigger> |
getAvailabilityWindows()
Gets the scheduler availability window for all subjects for whom a window has been set
|
Job |
getJob(String jobId)
Fetches a Job by jobId
|
List<IJobResult> |
getJobHistory(String jobId)
Returns a history of the runs for a particular job.
|
List<Job> |
getJobs(IJobFilter filter)
Lists currently scheduled jobs.
|
Integer |
getMinScheduleInterval(IScheduleSubject subject)
Get the minimum time that must elapse between job runs.
|
IScheduler.SchedulerStatus |
getStatus()
Returns the current scheduler status.
|
ComplexJobTrigger |
getSubjectAvailabilityWindow(IScheduleSubject subject)
Gets the scheduler availability window to the specified subject
|
void |
pause()
Pauses the entire scheduler, which prevents all scheduled jobs from running.
|
void |
pauseJob(String jobId)
Prevents the specified job from running in the future.
|
void |
removeJob(String jobId)
Removes the specified job from the list of scheduled jobs
|
void |
resumeJob(String jobId)
Allows previously paused jobs to resume running in the future.
|
void |
setAvailabilityWindows(Map<IScheduleSubject,ComplexJobTrigger> windows)
Replaces the scheduler availability map with the provided availability map.
|
void |
setMinScheduleInterval(IScheduleSubject subject,
int intervalInSeconds)
Sets the minimum time that must elapse between runs of any jobs.
|
void |
setSubjectAvailabilityWindow(IScheduleSubject subject,
ComplexJobTrigger window)
Sets when a particular subject is allowed to schedule jobs.
|
void |
shutdown()
Shuts the scheduler down so it will process no more jobs.
|
void |
start()
Allows the scheduler to process scheduled jobs.
|
void |
triggerNow(String jobId)
Triggers the given quartz job by jobId to be executed immediately
|
void |
updateJob(String jobId,
Map<String,Serializable> jobParams,
IJobTrigger trigger)
Updates both the parameters and trigger to be used to execute an existing scheduled action.
|
Job createJob(String jobName, Class<? extends org.pentaho.platform.api.action.IAction> action, Map<String,Serializable> jobParams, IJobTrigger trigger) throws SchedulerException
jobName
- the user defined name for the jobaction
- the action to be run at the scheduled time(s)jobParams
- the parameters to be passed to the action when it runstrigger
- the time(s) at which to run the actionSchedulerException
- If the job could not be scheduledJob createJob(String jobName, String actionId, Map<String,Serializable> jobParams, IJobTrigger trigger) throws SchedulerException
jobName
- the user defined name for the jobactionId
- the bean Id of the action to be run as defined an a plugin's plugin.xmljobParams
- the parameters to be passed to the action when it runstrigger
- the time(s) at which to run the actionSchedulerException
- If the job could not be scheduledJob createJob(String jobName, Class<? extends org.pentaho.platform.api.action.IAction> action, Map<String,Serializable> jobParams, IJobTrigger trigger, IBackgroundExecutionStreamProvider outputStreamProvider) throws SchedulerException
jobName
- the user defined name for the jobaction
- the action to be run at the scheduled time(s)jobParams
- the parameters to be passed to the action when it runstrigger
- the time(s) at which to run the actionoutputStreamProvider
- if the action being scheduled expects to write to an output stream, at the time of action execution the
this provider will be used to create the stream that passed to the action.SchedulerException
- If the job could not be scheduledJob createJob(String jobName, String actionId, Map<String,Serializable> jobParams, IJobTrigger trigger, IBackgroundExecutionStreamProvider outputStreamProvider) throws SchedulerException
jobName
- the user defined name for the jobactionId
- the bean Id of the action to be run as defined an a plugin's plugin.xmljobParams
- the parameters to be passed to the action when it runstrigger
- the time(s) at which to run the actionoutputStreamProvider
- if the action being scheduled expects to write to an output stream, at the time of action execution the
this provider will be used to create the stream that passed to the action.SchedulerException
- If the job could not be scheduledvoid updateJob(String jobId, Map<String,Serializable> jobParams, IJobTrigger trigger) throws SchedulerException
jobId
- the ID of an existing scheduled jobjobParams
- the parameters to be passed to the action when it runstrigger
- the time(s) at which to run the actionSchedulerException
- If the job could not be updatedvoid removeJob(String jobId) throws SchedulerException
jobId
- the job to be removedSchedulerException
void pauseJob(String jobId) throws SchedulerException
jobId
- the job to be pausedSchedulerException
void resumeJob(String jobId) throws SchedulerException
jobId
- the job to be resumedSchedulerException
Job getJob(String jobId) throws SchedulerException
jobId
- the job to be returnedSchedulerException
void triggerNow(String jobId) throws SchedulerException
jobId
- the job to be executedSchedulerException
void setSubjectAvailabilityWindow(IScheduleSubject subject, ComplexJobTrigger window)
subject
- the subject to which the subject applieswindow
- the window of time at which the scheduler is availablevoid setAvailabilityWindows(Map<IScheduleSubject,ComplexJobTrigger> windows)
windows
- the new scheduler availability mapComplexJobTrigger getSubjectAvailabilityWindow(IScheduleSubject subject)
subject
- the subject whose window is being requestedMap<IScheduleSubject,ComplexJobTrigger> getAvailabilityWindows()
void pause() throws SchedulerException
SchedulerException
void start() throws SchedulerException
SchedulerException
void shutdown() throws SchedulerException
SchedulerException
void setMinScheduleInterval(IScheduleSubject subject, int intervalInSeconds)
subject
- the subject to which the interval appliesthe
- interval in secondsInteger getMinScheduleInterval(IScheduleSubject subject)
subject
- the subject whose min interval is being requested return the minimum interval or null if no interval has
been setList<Job> getJobs(IJobFilter filter) throws SchedulerException
filter
- the filter to use to determine which jobs to return. If null all scheduled jobs are return.SchedulerException
List<IJobResult> getJobHistory(String jobId)
jobId
- the job for which to query it's execution historyIScheduler.SchedulerStatus getStatus() throws SchedulerException
SchedulerException
void addListener(ISchedulerListener listener)
void fireJobCompleted(org.pentaho.platform.api.action.IAction actionBean, String actionUser, Map<String,Serializable> params, IBackgroundExecutionStreamProvider streamProvider)
actionBean
- actionUser
- params
- streamProvider
-