public static Task getDelayTask() { Task task = new Task(); DelayJob job = new DelayJob(); task.setName("DelayJob"); task.setJob(job); task.setTrigger(CronTriggerExample.getTrigger0()); return task; }
public static Task getHelloTask() throws JobException { Task task = new Task(); ReflectionJob job = new ReflectionJob(); job.setClass("org.pinae.rafiki.job.HelloJob"); job.setMethod("sayHello"); Object[] parameters = new Object[2]; parameters[0] = new String("Hello"); parameters[1] = new String(" World"); job.setParameters(parameters); task.setName("HelloJob"); task.setJob(job); task.setTrigger(CronTriggerExample.getTrigger7()); return task; }