RecurringJob.AddOrUpdate
method is based on RecurringJobManager.AddOrUpdate
method that takes a Job
argument. The latter can be constructed with regular Type
and MethodInfo
classes:
var job = new Job(typeof(Console), typeof(Console).GetMethod("Write"));
var manager = new RecurringJobManager();
manager.AddOrUpdate("my-recurring-job", job, "* * * * *");