Align .editorconfig files Move Controller logic to DMO classes GlobalVars.AppSettings = Models.AppSettings.GetFromConfigurationManager(); Question EditorConfig Project level editorconfig Format White Spaces AppSetting when EnvironmentVariable not set Corrective Actions Tests Schedule Actions Tests DMO Tests Controller Tests Get ready to use VSCode IDE
40 lines
1.2 KiB
C#
40 lines
1.2 KiB
C#
using System.Web.Http;
|
|
using Fab2ApprovalSystem.Workers;
|
|
using Microsoft.Owin;
|
|
using Owin;
|
|
using Quartz;
|
|
using Quartz.Impl;
|
|
|
|
[assembly: OwinStartupAttribute(typeof(Fab2ApprovalSystem.Startup))]
|
|
namespace Fab2ApprovalSystem
|
|
{
|
|
|
|
public partial class Startup
|
|
{
|
|
protected void Application_Start()
|
|
{
|
|
GlobalConfiguration.Configure(WebApiConfig.Register);
|
|
|
|
ISchedulerFactory schedulerFactory = new StdSchedulerFactory();
|
|
|
|
IScheduler scheduler = schedulerFactory.GetScheduler().GetAwaiter().GetResult();
|
|
|
|
IJobDetail oooTrainingReportJob = JobBuilder.Create<OOOTrainingReportJob>()
|
|
.WithIdentity("oooTrainingReportJob", "trainingReportGroup")
|
|
.Build();
|
|
|
|
ITrigger oooTrainingReportTrigger = TriggerBuilder.Create()
|
|
.WithIdentity("oooTrainingReportTrigger", "trainingReportGroup")
|
|
.WithCronSchedule("15 13 * * MON")
|
|
.ForJob(oooTrainingReportJob)
|
|
.Build();
|
|
|
|
scheduler.ScheduleJob(oooTrainingReportJob, oooTrainingReportTrigger);
|
|
}
|
|
public void Configuration(IAppBuilder app)
|
|
{
|
|
ConfigureAuth(app);
|
|
}
|
|
}
|
|
}
|