I have a scheduled job that will fire every 1 minute, how can I schedule a job to run 10 sec later when added to scheduler?
var jobKey = new JobKey("firstJob", "jobGroup");
var firstJob = JobBuilder.Create<MatchJob>()
var firstTrigger = TriggerBuilder.Create()
.WithSimpleSchedule(x => x.WithIntervalInMinutes(1).RepeatForever())
What about doing it with a cron-expression looking something like this:
10 0/1 * * * ? *? This would fire with one minute intervals but 10 seconds after your other job.
To add a cron-expression simply use
.WithCronSchedule("10 0/1 * * * ? *") on your trigger.
The cron expression for your current job would be
0 0/1 * * * ? *. For a good tutorial on cron-expressions check this out!
If what you want is a job that is fired 10 seconds after its added to scheduler you could just do