0

I want to make 1 job and 1 schedule using quartz, but every job is run based table in the database

foreach (var i in query) { 
scheduler.ScheduleJob(JobBuilder.Create<i.classname>().Build(), TriggerBuilder.Create()
                    .WithSimpleSchedule(x => x
                        .WithIntervalInSeconds(40)
                        .RepeatForever()
                      )
                    .Build());
}

i.classname is a string, how to make a class ?

  • Hi Rahmad, welcome to stackoverflow. I voted to close your question as a duplicate because I think the other one covers your question. If that doesn't help, just [edit] your question to add more details. – Brian Oct 11 '17 at 14:50
  • This shouldn't be tagged with asp.net mvc or model-view-controller. You might be using those, but they bear no relevance to your question. Why wasn't this tagged with Quartz? –  Oct 11 '17 at 14:51
  • You probably want the 2nd duplicate link. Get the `Type` instance and pass that in to the `ScheduleJob` method overload that takes a `Type` as parameter. You can only use the overload that that uses a Generic type argument if you know the type at compile time, which you do not. – Igor Oct 11 '17 at 14:54
  • type class not found, where i get example it ? – Rahmad Faisal Oct 11 '17 at 15:06

0 Answers0