Email Reminders
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
using System;
|
||||
using Hangfire;
|
||||
using Microsoft.Owin;
|
||||
using MileageTraker.Web.Email;
|
||||
using Owin;
|
||||
|
||||
[assembly: OwinStartup(typeof(MileageTraker.Web.Startup))]
|
||||
|
||||
namespace MileageTraker.Web
|
||||
{
|
||||
public class Startup
|
||||
{
|
||||
public void Configuration(IAppBuilder app)
|
||||
{
|
||||
GlobalConfiguration.Configuration
|
||||
.UseSqlServerStorage("MileageTrakerContext");
|
||||
|
||||
app.UseHangfireDashboard();
|
||||
app.UseHangfireServer();
|
||||
|
||||
SetupRecurringJobs();
|
||||
}
|
||||
|
||||
private void SetupRecurringJobs()
|
||||
{
|
||||
RecurringJob.AddOrUpdate<ServiceReminderEmailService>(
|
||||
"serviceReminderJob", s => s.SendAllNotificationEmails(), Cron.Weekly(DayOfWeek.Monday, 6));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user