The recurring task is designed to run at specific intervals, that is, hourly, daily, so you provide a cron expression.
RecurringJob.AddOrUpdate(
() => YourRegularJob(),
Cron.Daily);
The background task is intended to be performed once , either by placing it in the queue, or by performing it immediately, or by delaying the task, which must be completed at a certain time.
BackgroundJob.Enqueue(
() => YourImmediateJob());
BackgroundJob.Schedule(
() => YourDelayedJob(),
TimeSpan.FromDays(3));
Jerry source
share