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 ?

4
  • 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. Commented Oct 11, 2017 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? Commented Oct 11, 2017 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. Commented Oct 11, 2017 at 14:54
  • type class not found, where i get example it ? Commented Oct 11, 2017 at 15:06

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.