TickerQ 2.0.1
dotnet add package TickerQ --version 2.0.1
NuGet\Install-Package TickerQ -Version 2.0.1
<PackageReference Include="TickerQ" Version="2.0.1" />
<PackageVersion Include="TickerQ" Version="2.0.1" />
<PackageReference Include="TickerQ" />
paket add TickerQ --version 2.0.1
#r "nuget: TickerQ, 2.0.1"
#addin nuget:?package=TickerQ&version=2.0.1
#tool nuget:?package=TickerQ&version=2.0.1
TickerQ
Robust. Adaptive. Precise.
TickerQ is a high-performance, modular background job scheduler for .NET applications. It supports cron-based and one-time jobs, integrates with Entity Framework Core for persistence, and offers a live dashboard UI powered by SignalR.
๐ Full Docs
๐ https://tickerq.arcenox.com
Dashboard:
โจ Features
- Time and Cron Scheduling
- Stateless Core with source generator
- EF Core Persistence (optional)
- Live Dashboard UI
- Retry Policies & Throttling
- Dependency Injection support
- Multi-node distributed coordination
๐ฆ Installation
Core (required)
dotnet add package TickerQ
Entity Framework Integration (optional)
dotnet add package TickerQ.EntityFrameworkCore
Dashboard UI (optional)
dotnet add package TickerQ.Dashboard
โ๏ธ Basic Setup
In Program.cs
or Startup.cs
builder.Services.AddTickerQ(options =>
{
options.SetMaxConcurrency(4); // Optional
options.SetExceptionHandler<MyExceptionHandler>(); // Optional
options.AddOperationalStore<MyDbContext>(); // Enables EF-backed storage
options.CancelMissedTickersOnApplicationRestart(); // Useful in distributed mode
options.AddDashboard(basePath: "/tickerq-dashboard"); // Dashboard path
options.AddDashboardBasicAuth(); // Enables simple auth
});
app.UseTickerQ(); // Activates job processor
Job Definition
1. Cron Job (Recurring)
public class CleanupJobs
{
[TickerFunction(FunctionName = "CleanupLogs", CronExpression = "0 0 * * *")]
public void CleanupLogs()
{
// Runs every midnight
}
}
This uses a cron expression to run daily at midnight.
2. One-Time Job (TimeTicker)
public class NotificationJobs
{
[TickerFunction(FunctionName = "SendWelcome")]
public Task SendWelcome(TickerFunctionContext<string> tickerContext ,CancellationToken ct)
{
Console.WriteLine(tickerContext.Request); // Output: User123
return Task.CompletedTask;
}
}
Then schedule it:
await _timeTickerManager.AddAsync(new TimeTicker
{
Function = "SendWelcome",
ExecutionTime = DateTime.UtcNow.AddMinutes(1),
Request = TickerHelper.CreateTickerRequest<string>("User123"),
Retries = 3,
RetryIntervals = new[] { 30, 60, 120 } // Retry after 30s, 60s, then 2min
});
3. Injecting Services in Jobs (Fully DI Support)
public class ReportJobs
{
private readonly IReportService _reportService;
public ReportJobs(IReportService reportService)
{
_reportService = reportService;
}
[TickerFunction(FunctionName = "GenerateDailyReport", CronExpression = "0 6 * * *")]
public async Task GenerateDailyReport()
{
await _reportService.GenerateAsync();
}
}
Dashboard UI
Enabled by adding:
options.AddDashboard(basePath: "/tickerq-dashboard");
options.AddDashboardBasicAuth(); // Optional
Accessible at /tickerq-dashboard
, it shows:
- System status
- Active tickers
- Job queue state
- Cron ticker stats
- Execution history
- Trigger/cancel/edit jobs live
Auth config (optional):
"TickerQBasicAuth": {
"Username": "admin",
"Password": "admin"
}
TickerQ vs Hangfire vs Quartz.NET
| Feature | TickerQ | Hangfire | Quartz.NET | |--------------------------------------|-----------------------------------|-----------------------------------|-------------------------------------| | Cron scheduling | โ Yes | โ Yes | โ Yes | | Time-based one-time jobs | โ Yes (TimeTicker) | โ ๏ธ Simulated via delay | โ Yes | | Persistent job store | โ With EF Core | โ Yes | โ Yes | | In-memory mode | โ Built-in | โ Built-in | โ Built-in | | Retry/cooldown logic | โ Advanced & configurable | โ ๏ธ Basic retries only | โ ๏ธ Manual | | Dashboard UI | โ First-party + real-time | โ Basic | โ ๏ธ Third-party required | | DI support | โ Native and seamless | ๐ Partial โ type-based only | โ ๏ธ Requires extra config | | Reflection-free job discovery | โ Roslyn-based, compile-time | โ Uses reflection | โ Uses reflection | | Multi-node/distributed support | โ Native with EF Core | โ ๏ธ Depends on storage | โ Yes | | Custom tickers (plugin model) | โ Fully extensible | โ Not extensible | โ ๏ธ Limited | | Parallelism & concurrency control | โ Built-in scheduler threadpool | โ Queues/ServerCount | โ ThreadPools | | Performance under high load | โ Optimized, no overhead | โ ๏ธ Depends on storage/db | โ ๏ธ Thread blocking possible | | Async/await support | โ Yes | โ ๏ธ Limited โ wrapped sync methods| โ Yes | | CancellationToken support | โ Propagated & honored | โ Not natively supported | ๐ Optional โ must check manually |
๐ Retry & Locking
TickerQ supports:
- Retries per job
- Retry intervals (
RetryIntervals
) - Distributed locking (EF mode only)
- Job ownership tracking across instances
- Cooldown on job failure
๐งช Advanced: Manual CronTicker Scheduling
await _cronTickerManager.AddAsync(new CronTicker
{
Function = "CleanupLogs",
CronExpression = "0 */6 * * *", // Every 6 hours
Retries = 2,
RetryIntervals = new[] { 60, 300 }
});
๐ ๏ธ Developer Tips
- Use
[TickerFunction]
to register jobs - Use
FunctionName
consistently across schedule and handler - Use
CancellationToken
for graceful cancellation - Use
Request
to pass dynamic data to jobs - Use
.AddDashboard()
only when EF Core is configured
๐ค Contribution
PRs, ideas, and issues are welcome!
- Fork & branch
- Code your change
- Submit a Pull Request
๐ License
MIT OR Apache 2.0 ยฉ Arcenox
You may choose either license to use this software.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. |
.NET Core | netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.1 is compatible. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.1
- Microsoft.AspNetCore.Http.Abstractions (>= 2.2.0)
- Microsoft.Extensions.Configuration.Abstractions (>= 2.1.0)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 2.1.0)
- Microsoft.Extensions.Logging.Abstractions (>= 2.1.0)
- TickerQ.Utilities (>= 2.0.0)
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 | |
---|---|---|---|
2.0.1 | 340 | 4/25/2025 | |
2.0.0 | 134 | 4/19/2025 | |
1.1.0 | 459 | 7/30/2023 | |
1.0.9-alpha | 149 | 4/16/2023 | |
1.0.8-alpha | 163 | 4/16/2023 | |
1.0.7-alpha | 167 | 4/16/2023 | |
1.0.6-alpha | 164 | 4/16/2023 | |
1.0.5-alpha | 164 | 4/13/2023 | |
1.0.4-alpha | 188 | 3/27/2023 | |
1.0.3-alpha | 170 | 3/27/2023 | |
1.0.2-alpha | 179 | 3/27/2023 | |
1.0.1-alpha | 159 | 3/27/2023 | |
1.0.0 | 304 | 4/20/2023 | |
1.0.0-alpha | 179 | 3/27/2023 |