为什么我收到“触发器的相关作业名称不能为空”石英误差
我收到此错误,即使我为我的作业指定了名称、组和描述,并且在调试器中我可以看到详细变量中所有这些字段的值。
JobDetail detail = getDetail();
Trigger newTrigger = getTrigger( detail );
_quartzScheduler.scheduleJob( newTrigger );
JobDetail getDetail()
{
JobBuilder jb = JobBuilder.newJob( LoadScheduleJob.class );
jb = jb.withIdentity( JOB_LABEL +"Fred", "Group" );
jb = jb.withDescription( "DD" );
jb = jb.usingJobData( SCHEDULEID_MAP_KEY, Integer.valueOf( 22 ) );
return jb.build();
}
Trigger getTrigger( JobDetail job ) throws ParseException
{
CronTriggerImpl t = new CronTriggerImpl();// TriggerBuilder.newTrigger().forJob( job ).
t.setName( TRIGGER_LABEL + 22 );
t.setGroup( "GroupJob" );
t.setCronExpression( "1/7 * * ? * *" );
return t;
}
我相信 Job 和 JobDetail 是同义词......这是正确的吗?
I'm getting this error, even though i'm specifying a name, group and description for my job, and in the debugger i can see values for all these fields in the detail variable.
JobDetail detail = getDetail();
Trigger newTrigger = getTrigger( detail );
_quartzScheduler.scheduleJob( newTrigger );
JobDetail getDetail()
{
JobBuilder jb = JobBuilder.newJob( LoadScheduleJob.class );
jb = jb.withIdentity( JOB_LABEL +"Fred", "Group" );
jb = jb.withDescription( "DD" );
jb = jb.usingJobData( SCHEDULEID_MAP_KEY, Integer.valueOf( 22 ) );
return jb.build();
}
Trigger getTrigger( JobDetail job ) throws ParseException
{
CronTriggerImpl t = new CronTriggerImpl();// TriggerBuilder.newTrigger().forJob( job ).
t.setName( TRIGGER_LABEL + 22 );
t.setGroup( "GroupJob" );
t.setCronExpression( "1/7 * * ? * *" );
return t;
}
I believe Job and JobDetail are synonymous...Is that correct?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
没关系。我发现我从来没有抽出时间来分配触发器的工作
Never mind. I see i never got around to assigning the trigger's job