Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kentico-ericd/xperience-community-tasks
Run custom code in the background on a timer
https://github.com/kentico-ericd/xperience-community-tasks
kentico-xperience task-scheduler
Last synced: about 2 months ago
JSON representation
Run custom code in the background on a timer
- Host: GitHub
- URL: https://github.com/kentico-ericd/xperience-community-tasks
- Owner: kentico-ericd
- License: mit
- Created: 2024-07-25T18:27:15.000Z (7 months ago)
- Default Branch: master
- Last Pushed: 2024-08-21T21:06:01.000Z (6 months ago)
- Last Synced: 2024-11-28T23:16:24.612Z (2 months ago)
- Topics: kentico-xperience, task-scheduler
- Language: C#
- Homepage:
- Size: 551 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# ⏲️ Xperience Community: Tasks
[![Nuget](https://img.shields.io/nuget/v/XperienceCommunity.Tasks)](https://www.nuget.org/packages/XperienceCommunity.Tasks#versions-body-tab)
[![build](https://github.com/kentico-ericd/xperience-community-tasks/actions/workflows/build.yml/badge.svg)](https://github.com/kentico-ericd/xperience-community-tasks/actions/workflows/build.yml)![Task listing](/images/ui.png)
## Description
This is a basic implementation of [Scheduled tasks](https://docs.kentico.com/13/configuring-xperience/scheduling-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 |## :gear: Package Installation
Add the package to your application using the .NET CLI
```powershell
dotnet add package XperienceCommunity.Tasks
```## 🚀 Quick Start
Add the following to your application's startup code:
```cs
builder.Services.AddKenticoTasks();
```Create one or more classes implementing `IXperienceTask` to run your custom code:
```cs
public class MyTask : IXperienceTask
{
public XperienceTaskSettings Settings => new(nameof(MyTask), 1);public Task Execute(CancellationToken cancellationToken)
{
// Do something...
}
}
```## 🗒 Full Instructions
View the [Usage Guide](./docs/Usage-Guide.md) for more detailed instructions.