我想從here中使用Quartz文檔代碼,但它不起作用。我的程序在第10行中不識別simpleSchedule()
!石英文檔代碼不起作用
// define the job and tie it to our HelloJob class
JobDetail job = newJob(HelloJob.class)
.withIdentity("myJob", "group1") // name "myJob", group "group1"
.build();
// Trigger the job to run now, and then every 40 seconds
Trigger trigger = newTrigger()
.withIdentity("myTrigger", "group1")
.startNow()
.withSchedule(simpleSchedule()
.withIntervalInSeconds(40)
.repeatForever())
.build();
// Tell quartz to schedule the job using our trigger
sched.scheduleJob(job, trigger);
'simpleSchedule()'被調用的方法。你有沒有定義它? –
@OskarKjellin不,我沒有定義它!我認爲這是石英的默認功能!我應該如何定義它?我的意思是它應該返回什麼,我應該定義什麼? –
你使用java或C#嗎?你顯示的代碼是用於java的,但你的標籤是用於asp.net –