Is it possible to create a recurring job in Hangfire that executes after a given number of days, say 8.
The nearest I found was to execute a job once in a week -
<A more cleaner Solution will be to use Cron.DayInterval(interval).
For your case it will be
RecurringJob.AddOrUpdate("MyJob",() => ScheduledJob(), Cron.DayInterval(8));
Finally I have used CronExpression
like this to schedule a recurring job with frequency of every 8 days or for any number of days for that matter.
string cronExp = "* * */8 * *";
RecurringJob.AddOrUpdate("MyJob",() => ScheduledJob(), cronExp);
The third segment in CronExpression
represents day of month.
The respective segments are as follows - (Ref: https://en.wikipedia.org/wiki/Cron)