public interface ScheduleService
Modifier and Type | Method and Description |
---|---|
Schedule |
createSchedule(String name,
String description,
Schedulable schedulable,
ScheduleTrigger trigger)
Creates a schedule that runs the job that is specified in the schedulable at the time that is defined in the
trigger.
|
void |
deleteSchedule(String id)
Deletes the schedule
|
Set<ScheduleDescriptor> |
getAllSchedules()
Gets all of the schedules defined in the system.
|
Set<ScheduleDescriptor> |
getCurrentUserSchedules()
Gets all of the schedules defined in the system for the current user.
|
Schedule |
getSchedule(String id)
Gets the full client representation of a schedule for the specified identifier.
|
boolean |
isRepositoryJobScheduled(String jobPath)
Indicates whether any schedules for the repository job exist.
|
boolean |
isWorkspaceJobScheduled(String jobPath)
Indicates whether any schedules for the workspace job exist.
|
void |
pauseSchedule(String id)
Pauses the schedule.
|
void |
resumeSchedule(String id)
Resumes the schedule
|
boolean |
scheduleExists(String scheduleName)
Indicates whether the schedule with the name exists.
|
Schedule |
updateSchedule(Schedule schedule)
Updates the schedule
|
Schedule createSchedule(String name, String description, Schedulable schedulable, ScheduleTrigger trigger) throws ScheduleException
name
- the name of the schedule.description
- the description of the schedule. This value can be null.schedulable
- the job to run when the schedule is triggered.trigger
- the mechanism by which the job that is specified in the Schedulable is scheduled.ScheduleException
- Thrown when the schedule is not created.Schedule updateSchedule(Schedule schedule) throws ScheduleException, ScheduleNotFoundException
schedule
- the schedule.ScheduleException
- Thrown when the schedule is not updated.ScheduleNotFoundException
- Thrown when the schedule is not found.void deleteSchedule(String id) throws ScheduleException, ScheduleNotFoundException
id
- the schedule.ScheduleException
- Thrown when the schedule is not deleted.ScheduleNotFoundException
- Thrown when the schedule is not found.Schedule getSchedule(String id) throws ScheduleException, ScheduleNotFoundException
id
- the identifier of the schedule to be retrieved.ScheduleException
- Thrown when the schedule is not retrieved.ScheduleNotFoundException
- Thrown when the schedule is not found.Set<ScheduleDescriptor> getAllSchedules() throws ScheduleException
ScheduleException
- Thrown when all schedules is not retrieved.Set<ScheduleDescriptor> getCurrentUserSchedules() throws ScheduleException
ScheduleException
- Thrown when the schedules is not retrieved.void pauseSchedule(String id) throws ScheduleException, ScheduleNotFoundException
id
- the schedule to pause.ScheduleException
- Thrown when the schedule is not paused.ScheduleNotFoundException
- Thrown when the schedule is not found.void resumeSchedule(String id) throws ScheduleException, ScheduleNotFoundException
id
- The schedule to resume.ScheduleException
- Thrown when the schedule is not resumed.ScheduleNotFoundException
- Thrown when the schedule is not found.boolean scheduleExists(String scheduleName)
scheduleName
- the schedule name.boolean isRepositoryJobScheduled(String jobPath)
jobPath
- the path of the job in the repository.boolean isWorkspaceJobScheduled(String jobPath) throws ScheduleException
jobPath
- the path of the job in the workspace.ScheduleException
- Thrown when schedules is not retrieved because of insufficient privilege.<i>Copyright (c) 2021, SAS Institute Inc., Cary, NC, USA</i>