Class SchedulerFactoryExtensions
- Namespace
- Quartz
- Assembly
- Quartz.dll
Convenience calls over the ISchedulerFactory members.
public static class SchedulerFactoryExtensions
- Inheritance
-
SchedulerFactoryExtensions
- Inherited Members
Methods
GetRequiredScheduler(ISchedulerFactory, string, CancellationToken)
Finds the scheduler with the given name, throwing when this container has none.
public static ValueTask<IScheduler> GetRequiredScheduler(this ISchedulerFactory schedulerFactory, string schedulerName, CancellationToken cancellationToken = default)
Parameters
schedulerFactoryISchedulerFactoryThe factory to ask.
schedulerNamestringThe scheduler's name. Matched ignoring case, as the repository indexes it.
cancellationTokenCancellationTokenThe cancellation instruction.
Returns
Remarks
LookupScheduler(string, CancellationToken) answers null for a name it does not know, and a caller that treats absence as a bug writes the same throw around it every time. This is that throw. What it deliberately does not do is list the schedulers that are there: the repository holds the ones that have been built, so a named scheduler registered but not yet asked for would be missing from that list and the report would be confidently wrong about what the container holds.
Exceptions
- SchedulerNotFoundException
No scheduler of that name is registered in this container.