TickerQTickerQ
Getting Started

Quick Start

Get TickerQ running in under 5 minutes.

1. Install

dotnet add package TickerQ

2. Register services

Program.cs
using TickerQ.DependencyInjection;

var builder = WebApplication.CreateBuilder(args);
builder.Services.AddTickerQ();

var app = builder.Build();
app.UseTickerQ();
app.Run();

3. Define and schedule a job

Jobs/WelcomeJobs.cs
using TickerQ.Utilities.Base;

public class WelcomeJobs
{
    [TickerFunction("send-welcome")]
    public async Task SendWelcome(
        TickerFunctionContext context,
        CancellationToken cancellationToken)
    {
        Console.WriteLine($"Job {context.Id} executed");
    }
}

Schedule it by function name:

var result = await timeTicker.AddAsync(new TimeTickerEntity
{
    Function      = "send-welcome",
    ExecutionTime = DateTime.UtcNow.AddSeconds(30),
});
Jobs/WelcomeJob.cs
using TickerQ.Utilities.Base;
using TickerQ.Utilities.Interfaces;

public class WelcomeJob : ITickerFunction
{
    public async Task ExecuteAsync(
        TickerFunctionContext context,
        CancellationToken cancellationToken)
    {
        Console.WriteLine($"Job {context.Id} executed");
    }
}
Program.cs
builder.Services.MapTicker<WelcomeJob>();

Schedule it by type — no magic strings:

var result = await timeTicker.AddAsync<WelcomeJob>(
    executionTime: DateTime.UtcNow.AddSeconds(30));

4. Run

dotnet run

The job fires 30 seconds later.

On this page