Quartz.Jobs provides some useful ready-made jobs for your convenience.
You need to add NuGet package reference to your project which uses Quartz.
Inspects a directory and compares whether any files' "last modified dates" have changed since the last time it was inspected. If one or more files have been updated (or created), the job invokes a "call-back" method on an
IDirectoryScanListenerthat can be found in the
Inspects a file and compares whether its "last modified dates" have changed since the last time it was inspected. If one or more files have been updated (or created), the job invokes a "call-back" method on an
IFileScanListenerthat can be found in the
Built in job for executing native executables in a separate process.
var job = new JobDetail("dumbJob", null, typeof(Quartz.Jobs.NativeJob)); job.JobDataMap.Put(Quartz.Jobs.NativeJob.PropertyCommand, "echo \"hi\" >> foobar.txt"); var trigger = TriggerUtils.MakeSecondlyTrigger(5); trigger.Name = "dumbTrigger"; await scheduler.ScheduleJob(job, trigger);
If PropertyWaitForProcess is true, then the integer exit value of the process will be saved as the job execution result in the
A Job which sends an e-mail with the configured content to the configured recipient.