Interface JobScheduleManager
-
public interface JobScheduleManager
Manage scheduling jobs- Since:
- 7/26/17
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
JobScheduleManager.BeforeExecutionBehavior
Defines behavior of beforeExecution
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default void
afterExecution(PreparedExecutionReference execution, java.util.Map<java.lang.String,java.lang.Object> jobDataMap, com.dtolabs.rundeck.core.authorization.UserAndRolesAuthContext authContext)
Post-run hook after a job/adhoc is executeddefault JobScheduleManager.BeforeExecutionBehavior
beforeExecution(PreparedExecutionReference execution, java.util.Map<java.lang.String,java.lang.Object> jobDataMap, com.dtolabs.rundeck.core.authorization.UserAndRolesAuthContext authContext)
Pre-run hook before a Job/adhoc is executedvoid
deleteJobSchedule(java.lang.String quartzJobName, java.lang.String quartzJobGroup)
Delete a name/group from the schedulerjava.lang.String
determineExecNode(JobReference job)
Return the uuid of the node that will execute the scheduled execution.java.util.Date
reschedulePendingJob(java.lang.String quartzJobName, java.lang.String quartzJobGroup)
Schedule a job that was previously scheduled as pendingjava.util.Date
scheduleJob(java.lang.String quartzJobName, java.lang.String quartzJobGroup, java.util.Map data, java.util.Date atTime, boolean pending)
Schedule a job for a certain timeboolean
scheduleJobNow(java.lang.String quartzJobName, java.lang.String quartzJobGroup, java.util.Map data, boolean pending)
Schedule a job to run nowdefault boolean
scheduleRemoteJob(java.util.Map data)
Schedule a job to run laterboolean
tryAcquireExecCleanerJob(java.lang.String uuid, java.lang.String project)
Tries to acquire the history cleaner ownership (only acquired if the owner of the job is dead)boolean
updateScheduleOwner(JobReference data)
In cluster mode, return true if the scheduleOWner should change to current node.
-
-
-
Method Detail
-
deleteJobSchedule
void deleteJobSchedule(java.lang.String quartzJobName, java.lang.String quartzJobGroup)
Delete a name/group from the scheduler- Parameters:
quartzJobName
- QUARTZ job namequartzJobGroup
- QUARTZ group name
-
scheduleJob
java.util.Date scheduleJob(java.lang.String quartzJobName, java.lang.String quartzJobGroup, java.util.Map data, java.util.Date atTime, boolean pending) throws JobScheduleFailure
Schedule a job for a certain time- Parameters:
quartzJobName
- QUARTZ job namequartzJobGroup
- QUARTZ group namedata
- dataatTime
- time to runpending
- if job should be in a pending state- Returns:
- time to run
- Throws:
JobScheduleFailure
-
scheduleJobNow
boolean scheduleJobNow(java.lang.String quartzJobName, java.lang.String quartzJobGroup, java.util.Map data, boolean pending) throws JobScheduleFailure
Schedule a job to run now- Parameters:
quartzJobName
- QUARTZ job namequartzJobGroup
- QUARTZ group namedata
- datapending
- if job should be scheduled in a pending state- Returns:
- true if successful
- Throws:
JobScheduleFailure
-
reschedulePendingJob
java.util.Date reschedulePendingJob(java.lang.String quartzJobName, java.lang.String quartzJobGroup) throws JobScheduleFailure
Schedule a job that was previously scheduled as pending- Parameters:
quartzJobName
- job namequartzJobGroup
- job group- Returns:
- time to run
- Throws:
JobScheduleFailure
-
updateScheduleOwner
boolean updateScheduleOwner(JobReference data)
In cluster mode, return true if the scheduleOWner should change to current node.- Parameters:
data
- map with job information, jobid and current schedule owner.- Returns:
- true if the scheduleOWner should change to current node.
-
determineExecNode
java.lang.String determineExecNode(JobReference job)
Return the uuid of the node that will execute the scheduled execution.- Parameters:
name
- job namegroup
- job groupdata
- map with job informations.project
- projectName- Returns:
- uuid of node for the scheduled execution
-
tryAcquireExecCleanerJob
boolean tryAcquireExecCleanerJob(java.lang.String uuid, java.lang.String project)
Tries to acquire the history cleaner ownership (only acquired if the owner of the job is dead)- Parameters:
uuid
- of the server that is trying to acquire ownershipproject
- the project where the job runs- Returns:
- true if the ownership was aquired
-
scheduleRemoteJob
default boolean scheduleRemoteJob(java.util.Map data)
Schedule a job to run later- Parameters:
data
- dataRundeckproClusterGrailsPlugin- Returns:
- true if successful
-
beforeExecution
default JobScheduleManager.BeforeExecutionBehavior beforeExecution(PreparedExecutionReference execution, java.util.Map<java.lang.String,java.lang.Object> jobDataMap, com.dtolabs.rundeck.core.authorization.UserAndRolesAuthContext authContext)
Pre-run hook before a Job/adhoc is executed- Parameters:
execution
- execution detail- Returns:
- proceed or skip
-
afterExecution
default void afterExecution(PreparedExecutionReference execution, java.util.Map<java.lang.String,java.lang.Object> jobDataMap, com.dtolabs.rundeck.core.authorization.UserAndRolesAuthContext authContext)
Post-run hook after a job/adhoc is executed- Parameters:
execution
- execution detail
-
-