文档如下: The keys of Jobs and Triggers (JobKey and TriggerKey) allow them to be placed into ‘groups’ which can be useful for organizing your jobs and triggers into categories such as “reporting jobs” and “maintenance jobs”. The name portion of the key of a job or trigger must be unique within the group - or in other words, the complete key (or identifier) of a job or trigger is the compound of the name and group. 简单说,name+group才是组成一个唯一key,通过key可以更新、停止任务等等。 写个简单的demo:
文档如下:
The keys of Jobs and Triggers (JobKey and TriggerKey) allow them to be placed into ‘groups’ which can be useful for organizing your jobs and triggers into categories such as “reporting jobs” and “maintenance jobs”. The name portion of the key of a job or trigger must be unique within the group - or in other words, the complete key (or identifier) of a job or trigger is the compound of the name and group.
简单说,name+group才是组成一个唯一key,通过key可以更新、停止任务等等。
写个简单的demo:
group的其他应用:
可以通过groupname来获取其下的所有jobkey