Quartz.UtilKeyJobKey
QuartzJobKey
Namespace: Quartz
Assembly: Quartz (in Quartz.dll) Version: 3.0.0
[SerializableAttribute] public sealed class JobKey : Key<JobKey>
The JobKey type exposes the following members.
Name | Description | |
---|---|---|
JobKey(String) | Initializes a new instance of the JobKey class | |
JobKey(String, String) | Initializes a new instance of the JobKey class |
Name | Description | |
---|---|---|
Group | Get the group portion of the key. | |
Name |
Get the name portion of the key.
(Inherited from KeyT.) |
Name | Description | |
---|---|---|
CompareTo | (Inherited from KeyT.) | |
Create(String) | ||
Create(String, String) | ||
Equals | (Inherited from KeyT.) | |
GetHashCode | (Inherited from KeyT.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
ToString | Return the string representation of the key. The format will be: <group>.<name>. |
Keys are composed of both a name and group, and the name must be unique within the group. If only a group is specified then the default group name will be used.
Quartz provides a builder-style API for constructing scheduling-related entities via a Domain-Specific Language (DSL). The DSL can best be utilized through the usage of static imports of the methods on the classes TriggerBuilder, JobBuilder, DateBuilder, JobKey, TriggerKey and the various IScheduleBuilder implementations.
Client code can then use the DSL to write code such as this:
IJobDetail job = JobBuilder.Create<MyJob>() .WithIdentity("myJob") .Build(); ITrigger trigger = TriggerBuilder.Create() .WithIdentity("myTrigger", "myTriggerGroup") .WithSimpleSchedule(x => x .WithIntervalInHours(1) .RepeatForever()) .StartAt(DateBuilder.FutureDate(10, IntervalUnit.Minute)) .Build(); scheduler.scheduleJob(job, trigger);