Quartz.net在应用程序启动时启动,并每60秒执行一次工作(将记录添加到数据库),但是当我将其上载到Azure时,它将停止执行其工作。怎么了?
public static async void Start()
{
IScheduler scheduler = await
StdSchedulerFactory.GetDefaultScheduler();
await scheduler.Start();
IJobDetail job = JobBuilder.Create<CurrencyUpdate>().Build();
ITrigger trigger = TriggerBuilder.Create()
.WithIdentity("trigger1", "group1")
.StartNow()
.WithSimpleSchedule(x => x
.WithIntervalInSeconds(60)
.RepeatForever())
.Build();
await scheduler.ScheduleJob(job, trigger);
}