EverTask Documentation
EverTask is a .NET background task execution library focused on persistence and resilience. Use it to process work in the background, run scheduled jobs, and build task pipelines that survive failures and restarts.
Quick Example
// 1. Register in Program.cs
builder.Services.AddEverTask(opt =>
opt.RegisterTasksFromAssembly(typeof(Program).Assembly)
).AddSqlServerStorage(connectionString);
// 2. Define your task
public record SendEmailTask(string To, string Subject) : IEverTask;
// 3. Define your handler
public class SendEmailHandler : EverTaskHandler<SendEmailTask>
{
public override async Task Handle(SendEmailTask task, CancellationToken ct)
{
await _emailService.SendAsync(task.To, task.Subject);
}
}
// 4. Dispatch anywhere
await _dispatcher.Dispatch(new SendEmailTask("user@example.com", "Hello!"));
With those four steps in place, EverTask persists the task, executes it in the background, and retries it if the handler throws. See Getting Started for the details.
Table of Contents
Getting Started
- Getting Started - Get EverTask running in your app
- Task Creation - Create and configure tasks and handlers
- Task Dispatching - Execute tasks immediately or on a schedule
Core Concepts
- Storage - Choose your persistence layer (SQL Server, PostgreSQL, SQLite, or in-memory)
- Overview - Picking a provider
- Audit Configuration - Audit levels and retention
- In-Memory Storage - Zero-infra storage for dev and tests
- SQL Server Storage - Setup and schema
- PostgreSQL Storage - Setup and schema
- SQLite Storage - Setup and connection strings
- Custom Storage - Implement ITaskStorage
- Serialization - System.Text.Json payload contract
- Best Practices - Patterns and pitfalls
- Configuration - Configure EverTask
- Configuration Reference - Complete configuration options
- Configuration Cheatsheet - Quick reference guide
Advanced Topics
- Recurring Tasks - Schedule jobs with the fluent API or cron expressions
- Overview - Concepts and when to use recurring tasks
- Fluent Scheduling API - Build schedules by minute, hour, day, week, or month
- Cron Expressions - 5- and 6-field cron schedules
- Idempotent Registration - Register recurring tasks safely on every startup
- Managing Tasks - Inspect, cancel, and reschedule recurring tasks
- Best Practices - Patterns and pitfalls
- Resilience - Handle failures with retry policies and timeouts
- Overview - Failure handling at a glance
- Retry Policies - Linear retry, custom policies, Polly
- Exception Filtering - Whitelist, blacklist, and predicate filtering
- Retry Callbacks - React to each retry attempt
- Timeout Management - Per-handler, per-queue, and global timeouts
- Cancellation Tokens - Cooperative cancellation in handlers
- Graceful Shutdown - What happens to running tasks on stop
- Error Observation - Observe and record failures
- Best Practices - Patterns and pitfalls
- Scalability - Performance and scalability features
- Multi-Queue Support - Workload isolation by priority or domain
- Sharded Scheduler - Lower scheduler lock contention under high Schedule() call rates
- Keyed Rate Limiting - Per-tenant/per-resource throttling against external API limits
- Monitoring - Complete monitoring guide
- Custom Event Monitoring - Event system and integrations
- Monitoring Dashboard - Web dashboard and REST API
- API Reference - Complete API documentation
- Dashboard UI Guide - UI features and screenshots
- Task Execution Logs - Log capture and persistence
- Workflows - Coordinate complex workflows
- Task Orchestration - Continuations, cancellation, rescheduling
- Custom Workflows - Build complex task pipelines
- Architecture - How EverTask works under the hood
Tooling
- Agent Skill - AI-assisted integration: install the skill and let an agent wire up EverTask (one-step on Claude Code)
Quick Links
Support
For questions, bug reports, or contributions, use the GitHub Issues page.