This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Coravel; | |
using CoravelDemo; | |
var builder = WebApplication.CreateBuilder(args); | |
builder.Services.AddSingleton<UpdateCacheService>(); | |
builder.Services.AddScheduler(); | |
var app = builder.Build(); | |
var provider = app.Services; | |
provider.UseScheduler(scheduler => |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Timers; | |
using Cronos; | |
namespace TimedHostedServiceDemo; | |
public class TimedHostedService : IHostedService, IDisposable | |
{ | |
private readonly ILogger<TimedHostedService> _logger; | |
private System.Timers.Timer _timer = null; | |
private readonly CronExpression _expression; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections; | |
using System.Configuration; | |
using System.Reflection; | |
using System.Web; | |
[assembly: PreApplicationStartMethod(typeof(EnvSettings.SettingsProcessor), "Start")] | |
namespace EnvSettings | |
{ |