Skip to content

kentico-ericd/xperience-community-tasks

Repository files navigation

⏲️ Xperience Community: Tasks

Nuget build

Task listing

Description

This is a basic implementation of Scheduled tasks for Xperience by Kentico. This package does not store information in the database. This means that tasks do not retain their next execution time or execution count between application restarts. Tasks will run at at application start, after their interval has passed. For example, if the application is started at 7:00, a task with an interval of 5 minutes will execute at 7:05.

Library Version Matrix

Xperience Version Library Version
29.x.y >=1.x.y

⚙️ Package Installation

Add the package to your application using the .NET CLI

dotnet add package XperienceCommunity.Tasks

🚀 Quick Start

Add the following to your application's startup code:

builder.Services.AddKenticoTasks();

Create one or more classes implementing IXperienceTask to run your custom code:

public class MyTask : IXperienceTask
{
    public XperienceTaskSettings Settings => new(nameof(MyTask), 1);

    public Task Execute(CancellationToken cancellationToken)
    {
        // Do something...
    }
}

🗒 Full Instructions

View the Usage Guide for more detailed instructions.