Added jobs project and updated nuget packages

This commit is contained in:
2026-10-27 08:28:24 +02:00
parent 9f132eeb29
commit 129d10c7d1
9 changed files with 126 additions and 61 deletions
+17
View File
@@ -0,0 +1,17 @@
namespace PostFundManagement.Jobs
{
public class Worker(ILogger<Worker> logger) : BackgroundService
{
protected override async Task ExecuteAsync(CancellationToken stoppingToken)
{
while (!stoppingToken.IsCancellationRequested)
{
if (logger.IsEnabled(LogLevel.Information))
{
logger.LogInformation("Worker running at: {time}", DateTimeOffset.Now);
}
await Task.Delay(1000, stoppingToken);
}
}
}
}