Seeding
TickerQ supports multiple seeding strategies for initializing jobs in the database when the application starts.
Seeding Strategies
TickerQ provides three seeding mechanisms:
1. Automatic Cron Seeding
Automatic seeding of cron jobs from [TickerFunction] attributes with cron expressions.
2. Custom Seeding
Programmatic seeding using custom logic for TimeTicker and CronTicker jobs.
3. Disabling Seeding
How to prevent automatic seeding when you manage jobs manually.
Seeding Order
When using Entity Framework Core persistence, seeding occurs in the following order on application startup:
- Dead node resource cleanup - Releases resources from dead nodes
- Automatic cron seeding (if enabled) - Seeds cron jobs from
[TickerFunction]attributes - Custom time ticker seeding (if configured) - Executes
UseTickerSeedertime ticker function - Custom cron ticker seeding (if configured) - Executes
UseTickerSeedercron ticker function
Seeding Lifecycle
Seeding happens automatically when:
- Application starts (via
IHostApplicationLifetime.ApplicationStarted) - Entity Framework Core persistence is configured
UseTickerQ()is called
All seeding operations are logged through the instrumentation system, allowing you to track seeding progress.
See Also
- Automatic Cron Seeding - Learn about attribute-based seeding
- Custom Seeding - Implement your own seeding logic
- Disable Seeding - Prevent automatic seeding
- Entity Framework Configuration - Complete EF Core setup
