Implemented startup jobs
continuous-integration/drone/pr Build is passing

This commit is contained in:
Khwezi Mngoma
2026-05-10 17:20:57 +02:00
parent 988ba4113c
commit 41f92d0670
4 changed files with 20 additions and 22 deletions
+15
View File
@@ -0,0 +1,15 @@
using LiteCharms.Abstractions;
using LiteCharms.Features.Notifications.Events;
namespace LiteCharmsScheduler.Workers
{
public class JobWorker(IJobOrchestrator jobOrchestrator, ILogger<JobWorker> logger) : BackgroundService
{
protected override async Task ExecuteAsync(CancellationToken stoppingToken)
{
await jobOrchestrator.ScheduleAsync(ProcessEmailNotificationsEvent.Create(), "0 1 * * * ?", stoppingToken);
logger.LogInformation("Startup jobs scheduled");
}
}
}