2 years ago

#28780

test-img

ibrahim avci

while using quartz.net for more than one scheduled job i am getting 'System.Data.Entity.Core.EntityException' in EntityFramework.SqlServer.dll

I am interested in programming as an amateur. I am trying to make MVC based web program using c#. I have 2 scheduled jobs. I am using quartz.net for it. One of them does a long-running job in the background, while the other sends notification messages to the user according to the status of the job. The first job will run every 5 minutes while the other (the notification one) will run 1 every minute. But if the other job starts running while the long running job is running in the background, I get the following exception:'System.Data.Entity.Core.EntityException' in EntityFramework.SqlServer.dll

I am using one scheduler for 2 jobs.

            await scheduler.ScheduleJob(notificationTaskJob, notificationTaskTrigger);
            await scheduler.ScheduleJob(programTaskJob, programTrigger);

and i am using Singleton Design Pattern to create DatabaseContext. I'm not sure if it has anything to do with it.

I hope I explained my question properly.

c#

entity-framework

quartz.net

0 Answers

Your Answer

Accepted video resources