Class XmlSchedulingDataProcessorPlugin
This plugin loads XML file(s) to add jobs and schedule them with triggers as the scheduler is initialized, and can optionally periodically scan the file for changes.
public sealed class XmlSchedulingDataProcessorPlugin : ISchedulerPlugin, IFileScanListener
- Inheritance
-
XmlSchedulingDataProcessorPlugin
- Implements
- Inherited Members
Remarks
The XML format is frozen at job_scheduling_data_2_0.xsd: it declares simple,
cron and calendar-interval triggers and nothing else, and it will not gain the
trigger kinds or the trigger settings added since. Files that exist keep working for the life of
4.x; a schedule that needs anything the schema cannot spell is written as JSON and read by
JsonSchedulingDataProcessorPlugin, which is the maintained
format.
The periodically scanning of files for changes is not currently supported in a clustered environment.
Constructors
XmlSchedulingDataProcessorPlugin()
Initializes a new instance of the XmlSchedulingDataProcessorPlugin class.
public XmlSchedulingDataProcessorPlugin()
XmlSchedulingDataProcessorPlugin(ILogger<XmlSchedulingDataProcessorPlugin>, ITypeLoader, TimeProvider)
Initializes a new instance of the XmlSchedulingDataProcessorPlugin class.
public XmlSchedulingDataProcessorPlugin(ILogger<XmlSchedulingDataProcessorPlugin> logger, ITypeLoader typeLoader, TimeProvider timeProvider)
Parameters
loggerILogger<XmlSchedulingDataProcessorPlugin>typeLoaderITypeLoadertimeProviderTimeProvider
Methods
FileUpdated(string, CancellationToken)
Informs that certain file has been updated.
public ValueTask FileUpdated(string fileName, CancellationToken cancellationToken = default)
Parameters
fileNamestringcancellationTokenCancellationToken
Returns
Initialize(string, IScheduler, CancellationToken)
Called during creation of the IScheduler in order to give the ISchedulerPlugin a chance to initialize.
public ValueTask Initialize(string pluginName, IScheduler scheduler, CancellationToken cancellationToken = default)
Parameters
pluginNamestringschedulerISchedulercancellationTokenCancellationToken
Returns
Start(CancellationToken)
Called when the associated IScheduler is started, in order to let the plug-in know it can now make calls into the scheduler if it needs to.
public ValueTask Start(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationToken