Class TaskCreator

java.lang.Object
org.tailormap.api.scheduling.TaskCreator

@Service public class TaskCreator extends Object
  • 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 create
      jobData - a map with job data, the type and description keys are mandatory
      cronExpression - the cron expression
      Returns:
      the task name, a UUID
      Throws:
      org.quartz.SchedulerException - if the job could not be scheduled