Sparkdo.BackgroundWorkers.TickerQ 1.0.1

There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package Sparkdo.BackgroundWorkers.TickerQ --version 1.0.1
                    
NuGet\Install-Package Sparkdo.BackgroundWorkers.TickerQ -Version 1.0.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Sparkdo.BackgroundWorkers.TickerQ" Version="1.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Sparkdo.BackgroundWorkers.TickerQ" Version="1.0.1" />
                    
Directory.Packages.props
<PackageReference Include="Sparkdo.BackgroundWorkers.TickerQ" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Sparkdo.BackgroundWorkers.TickerQ --version 1.0.1
                    
#r "nuget: Sparkdo.BackgroundWorkers.TickerQ, 1.0.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Sparkdo.BackgroundWorkers.TickerQ@1.0.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Sparkdo.BackgroundWorkers.TickerQ&version=1.0.1
                    
Install as a Cake Addin
#tool nuget:?package=Sparkdo.BackgroundWorkers.TickerQ&version=1.0.1
                    
Install as a Cake Tool

Sparkdo.BackgroundWorkers.TickerQ

Sparkdo TickerQ 后台工作者库,提供基于 TickerQ 的后台工作者功能集成实现。

功能特性

  • 与 TickerQ 后台工作者框架无缝集成
  • 支持周期性后台任务的调度和执行
  • 支持 Cron 表达式配置
  • 支持重试机制配置
  • 支持任务优先级配置
  • 与 Sparkdo 框架无缝集成

安装

<PackageReference Include="Sparkdo.BackgroundWorkers.TickerQ" Version="x.x.x" />

核心组件

SparkdoBackgroundWorkersTickerQModule

TickerQ 后台工作者模块配置类,负责配置和注册 TickerQ 相关服务到依赖注入容器中:

  • 注册 SparkdoTickerQBackgroundWorkersProvider 服务
  • 替换默认的后台工作者管理器为 TickerQ 实现
  • 初始化 CronTicker 并添加到管理器中

SparkdoTickerQBackgroundWorkerManager

Sparkdo TickerQ 后台工作者管理器,负责管理 TickerQ 后台工作者的注册和执行:

  • AddAsync(): 异步添加后台工作者
  • GetCron(): 根据时间间隔获取 Cron 表达式

SparkdoTickerQPeriodicBackgroundWorkerInvoker

Sparkdo TickerQ 周期性后台工作者调用器,负责调用周期性后台工作者的执行方法:

  • DoWorkAsync(): 执行工作异步方法

SparkdoBackgroundWorkersTickerQOptions

Sparkdo BackgroundWorkers TickerQ 配置选项类,用于配置和管理 TickerQ 后台工作者的相关选项:

  • AddConfiguration(): 添加特定工作者类型的配置
  • GetConfigurationOrNull(): 获取特定工作者类型的配置

SparkdoBackgroundWorkersCronTickerConfiguration

Sparkdo BackgroundWorkers CronTicker 配置类,用于配置 CronTicker 的相关选项:

  • Retries: 重试次数
  • RetryIntervals: 重试间隔数组
  • Priority: 任务优先级

SparkdoTickerQBackgroundWorkersProvider

Sparkdo TickerQ 后台工作者提供者,用于管理和存储 TickerQ 后台工作者的信息:

  • BackgroundWorkers: 后台工作者字典

SparkdoTickerQCronBackgroundWorker

Sparkdo TickerQ Cron 后台工作者信息类,用于存储 Cron 后台工作者的相关信息:

  • Function: 函数名称
  • CronExpression: Cron 表达式
  • WorkerType: 工作者类型

扩展性

该库提供了完整的 TickerQ 集成功能实现,可以通过以下方式扩展:

  1. 继承 SparkdoTickerQBackgroundWorkerManager 来添加自定义的后台工作者管理逻辑
  2. 通过配置 SparkdoBackgroundWorkersTickerQOptions 来自定义工作者行为
  3. 实现自定义的后台工作者调用器

代码结构说明

本项目包含以下主要组件:

模块配置

  • SparkdoBackgroundWorkersTickerQModule: TickerQ 后台工作者模块配置类

工作者管理

  • SparkdoTickerQBackgroundWorkerManager: TickerQ 后台工作者管理器

工作者调用

  • SparkdoTickerQPeriodicBackgroundWorkerInvoker: TickerQ 周期性后台工作者调用器

配置管理

  • SparkdoBackgroundWorkersTickerQOptions: TickerQ 配置选项类
  • SparkdoBackgroundWorkersCronTickerConfiguration: CronTicker 配置类

工作者信息

  • SparkdoTickerQBackgroundWorkersProvider: TickerQ 后台工作者提供者
  • SparkdoTickerQCronBackgroundWorker: TickerQ Cron 后台工作者信息类

所有公共接口和类都添加了详细的 XML 文档注释,便于开发者理解和使用。

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.2-preview.1 144 12/4/2025
1.0.1 185 11/27/2025
1.0.0 179 11/25/2025
1.0.0-preview.5 108 10/24/2025