Grouping significance

41 Views Asked by At

I just started to explore Quartz, and i was wondering whats the programmatic usage of "Job Key" and "Trigger Key". I see in these key it needs give the value for Group. I dint understood why we need this grouping in the program.

Can please any one help me with this query.

Thanks.

1

There are 1 best solutions below

0
On

You can get all job keys which are belongs to a group with the method Scheduler.getJobKeys(GroupMatcher<JobKey> matcher) and control them without complicated regex key matcher.

But, it's not mandatory. you don't need to specify the group into JobKey constructor. you can use the following constructor:

public JobKey(String name)

In this case, group name is set 'DEFAULT' as default value.