Coravel Schedule

https://docs.coravel.net/Installation/

// c# Add Coravel Parkage

In startup.cs add below code:

---- ConfigureServices -----
Services.AddScheduler();
Services.AddTransient<SampleInvocable>();

---- Configure ----
var provider = app.ApplicationServices;
provider.UseScheduler(scheduler =>
{
    scheduler.Schedule<SampleInvocable>();
    .EveryMinute()
    .Weekday();
});

// method 

public class SampleInvocable : IInvocable
{
    public Task Invoke()
    {
       Console.WriteLine("Every minute on weekday ..");
       return Task.CompletedTask;
     }
}

Cron expression generator: https://crontab.cronhub.io/

reloadOnChange for appsettings.json

Change appsettings.json value when updating data in the database

Last updated

Was this helpful?