--
You received this message because you are subscribed to the Google Groups "Quartz.NET" group.
To unsubscribe from this group and stop receiving emails from it, send an email to quartznet+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/quartznet/522b9ee6-5fce-41ae-bd8e-736d951c972a%40googlegroups.com.
Hi,
First you implement the Job you want to execute in a C# class.
So if you do a lot of different stuff you must implement many of that.
public class MyJob : IJob
{
Second, you use the JobBuild to create the JobDetail that is the prepared object to run the job.
IJobDetail job = JobBuilder.Create<MyJob>()
Third you create the TRIGGER with the schedule you need.
ITrigger trigger = TriggerBuilder.Create()
.WithCronSchedule(/* Check docs to know how to make the schedule you need */)
.Build();
And Forth and last you tell the Scheduler what job (detail) you want to run when (trigger):
await scheduler.ScheduleJob(job, trigger);
And of course, you must before that all create the “scheduler”:
StdSchedulerFactory factory = new StdSchedulerFactory();
scheduler = await factory.GetScheduler();
And after configure it all executes scheduler.Start();
Best regards,
Alexandre Américo Fumes. |
|
--
--
Job1 to send an email that runs daily at 10 am
Job2 to open calculator that runs every Sunday at 1 pm
Job3 to open an application(console) weekly on Monday at 2 pm
Job4 to send mails to email id from a field of table in a database on 2nd Monday at 11 pm of every month.
Also is it possible to store the information about a job in quartz itself?(i found something about JOBDATAMAP).
If I need to get the triggering information and job information from the database how it can be implemented?
Thank you....
To unsubscribe from this group and stop receiving emails from it, send an email to quar...@googlegroups.com.