public static async Task Main(string[] args)
{
var host = new HostBuilder()
.ConfigureServices((hostContext, services) =>
{
services.AddScheduledJob<MyJob>(options =>
{
// Crontab expression: At 04:05 on Sunday
options.ExecutionSchedule = "5 4 * * sun";
});
})
.Build();
await host.RunAsync();
}
public class MyJob : IScheduledJob
{
public Task ExecuteAsync()
{
// Do work.
return Task.CompletedTask;
}
}
-
Notifications
You must be signed in to change notification settings - Fork 0
Scheduled jobs for Generic Host and ASP.NET Core Web Host
License
luca-esse/Hosting.ScheduledJobs
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
Scheduled jobs for Generic Host and ASP.NET Core Web Host
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published