Package org.tailormap.api.scheduling
Class TaskCreator
java.lang.Object
org.tailormap.api.scheduling.TaskCreator
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncreateTask
(Class<? extends org.springframework.scheduling.quartz.QuartzJobBean> job, TMJobDataMap jobData, String cronExpression) Create a job and schedule it with a cron expression.
-
Constructor Details
-
TaskCreator
public TaskCreator(@Autowired org.quartz.Scheduler scheduler)
-
-
Method Details
-
createTask
public String createTask(Class<? extends org.springframework.scheduling.quartz.QuartzJobBean> job, TMJobDataMap jobData, String cronExpression) throws org.quartz.SchedulerException Create a job and schedule it with a cron expression.- Parameters:
job
- the task class to createjobData
- a map with job data, thetype
anddescription
keys are mandatorycronExpression
- the cron expression- Returns:
- the task name, a UUID
- Throws:
org.quartz.SchedulerException
- if the job could not be scheduled
-