Beispiel #1
0
        public static void UseWallpaperJob(this IServiceProvider service)
        {
            var job = service.GetService <WallpaperJob>();

            //RecurringJob.AddOrUpdate("壁纸数据抓取", () => job.ExecuteAsync(), CronType.Day(1, 1, 1));

            RecurringJob.AddOrUpdate("壁纸数据抓取", () => job.ExecuteAsync(), CronType.Minute(3));
        }
Beispiel #2
0
        public static void UseHangfireTest(this IServiceProvider service)
        {
            var job = service.GetService <HangfireTestJob>();

            RecurringJob.AddOrUpdate("定时任务测试", () => job.ExecuteAsync(), CronType.Minute());
        }