Email Reminders

This commit is contained in:
2015-10-28 10:25:19 -04:00
parent 9177a8dbb3
commit cfe753fb00
13 changed files with 272 additions and 10 deletions
+30
View File
@@ -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));
}
}
}