Click here to Skip to main content
15,891,473 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I want to create a Quartz.net Scheduler in the asp.net mvc application .When application start
I want to read the database and add the scheduler trigger and jobs to existing scheduler object.
something like this,

IScheduler scheduler= schedFact.GetScheduler();
sched.Start();

var items = Db.item().ToList();
foreach (var t in items){

uartz.IJobDetail jobDetail = Quartz.JobBuilder.Create<simplejob>()
.WithIdentity(t.jobName)
.StoreDurably()
.Build();

Quartz.ITrigger trigger = Quartz.TriggerBuilder.Create()
.WithIdentity(t.triggerName)
.WithSchedule(Quartz.CronScheduleBuilder.CronSchedule(t.cronExpression)
.ForJob(t.jobName)
.Build();

scheduler.ScheduleJob(jobDetail, trigger);

}

how can i implements this.

Please help.
Posted

1 solution

Hi,

Please check:
https://sites.google.com/site/poshanyehwork/windows/aspnetscheduledtaskswithquartznetworkingtested[^]
From here you can download working example also.
For Advance use please check:
1. Check Cron job documentation and other examples
http://www.quartz-scheduler.net/documentation/quartz-2.x/tutorial/index.html[^]
2. Detailed API Documentation
http://quartznet.sourceforge.net/apidoc/2.0/html/[^]
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900