Open jensvrai opened 7 years ago
Probably the easiest way to do this is to also specify a retry()
on the job that matches the desired repeat frequency. Retry is not as flexible as repeat, but for the case you describe it should suffice by simply specifying each retry to be 1 day minus your workTimeout value. If you specify infinite retries, it will retry once per day and when it finally succeeds, the next repeat will automatically occur as scheduled.
I have a questions about job.fail() and repeats. We currently have some long running jobs, which wait for feedback from external services but sometimes it never comes. So we used the workTimeout option when calling processJobs. But we also defined a repeat schedule for the job, so it runs everyday. Is there an options that when a job fails, it is rescheduled based on the repeat schedule? Like it does when job.done is called?