Nucleus .Net Core CMS

IScheduledTask Interface

Namespace: Nucleus.Abstractions
Assembly: Nucleus.Abstractions.dll
Scheduled task class interface.


Scheduled Tasks implement the InvokeAsync method to perform their work. The implementation of InvokeAsync should execute asynchronously (either return a Task object, or if your implementation doesn't use async methods, use Task.Run to call a function then return immediately) so that scheduled tasks can run in parallel. The progress object should be used to report success or failure by calling progress.Report.


InvokeAsync (RunningTask,IProgress<ScheduledTaskProgress>,CancellationToken) Method

InvokeAsync (RunningTask task, IProgress<ScheduledTaskProgress> progress, CancellationToken cancellationToken)
Execute the scheduled task logic.
Name Type
task Nucleus.Abstractions.Models.TaskScheduler.RunningTask
progress System.IProgress<Nucleus.Abstractions.Models.TaskScheduler.ScheduledTaskProgress>
cancellationToken System.Threading.CancellationToken