I am new to Quartz and I'm running into a compiling error. I am simply trying to get the HelloJob to run based on Quartz's Lesson 1 for Hello World. I am having trouble declaring a
The method newJob(Class<? extends Job>)
// define the job and tie it to our HelloJob class
JobDetail job = newJob(HelloJob.class)
// Trigger the job to run now, and then repeat every 40 seconds
Trigger trigger = newTrigger()
JobDetail job = JobBuilder.newJob(HelloJob.class)
JobDetail job = new JobDetail("job1", "group1", HelloJob.class);
Cannot instantiate the type JobDetail
You need to have this line of code:
import static org.quartz.JobBuilder.*;
And then in should work. Hopefully.
Edit: AND MAKE SURE 'HELLOJOB' IMPLEMENTS JOB!!