How to Recurring Batch Job

recurring
Tags: #<Tag:0x00007f64b63542e8>

#1

let say i have

RecurringJob.AddOrUpdate(
    () => batchId ,
    Cron.Daily);
    var batchId = BatchJob.StartNew(x =>
    {
        x.Enqueue(() => Console.WriteLine("Job 1"));
        x.Enqueue(() => Console.WriteLine("Job 2"));
    });

How should my code will be to perform batchjob using recurringjob ?


#2

I’m not 100% sure what you’re asking, but I don’t think you can Schedule a Recurring Batch.

If you can’t, you could schedule a recurring Background Job and inside that Background Job kick off your Batch Jobs.