diff --git a/Streetcode/Streetcode.WebApi/Program.cs b/Streetcode/Streetcode.WebApi/Program.cs index 02523a8..618ff1a 100644 --- a/Streetcode/Streetcode.WebApi/Program.cs +++ b/Streetcode/Streetcode.WebApi/Program.cs @@ -40,11 +40,18 @@ if (app.Environment.EnvironmentName != "Local") { BackgroundJob.Schedule( - wp => wp.ParseZipFileFromWebAsync(), TimeSpan.FromMinutes(1)); + wp => wp.ParseZipFileFromWebAsync(), + TimeSpan.FromMinutes(1)); + RecurringJob.AddOrUpdate( - wp => wp.ParseZipFileFromWebAsync(), Cron.Monthly); + recurringJobId: "parse-zip-from-web-monthly", + wp => wp.ParseZipFileFromWebAsync(), + Cron.Monthly); + RecurringJob.AddOrUpdate( - b => b.CleanBlobStorage(), Cron.Monthly); + recurringJobId: "clean-blob-monthly", + b => b.CleanBlobStorage(), + Cron.Monthly); } app.MapControllers();