1

Quartz.net starts when the application starts and does its work (adding records to the database) every 60 seconds, but when I upload it to Azure, it stops performing its work. What could be wrong?

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);
}
Cyber User
  • 863
  • 1
  • 7
  • 13
  • What do you mean by "it stops performing its work?" Have you seen any logs or anything else to help identify the issue? – David Makogon Jan 14 '19 at 17:56
  • 1
    Possible duplicate of [using quartz.net on windows azure](https://stackoverflow.com/questions/18057925/using-quartz-net-on-windows-azure) – CSharpRocks Jan 14 '19 at 18:25
  • What kind of application are you building? Quartz.net is a job scheduler, which needs the host application to keep running. Are you sure your application keeps running? Have a look at using Timer Triggers (Functions or WebJobs) to do job scheduling on Azure. – rickvdbosch Jan 14 '19 at 19:59
  • @DavidMakogon Logs unfortunately are not available, where I can get acquainted with them in Azure? – Cyber User Jan 15 '19 at 00:56
  • @CSharpRocks this is hardly related to my problem – Cyber User Jan 15 '19 at 00:57
  • @rickvdbosch This is a web site. In the application settings, the "Always on" option works. – Cyber User Jan 15 '19 at 01:01

0 Answers0