/// <summary> /// 每日热点数据抓取 /// </summary> /// <param name="context"></param> public static void UseHotNewsJob(this IServiceProvider service) { var job = service.GetService <HotNewsJob>(); RecurringJob.AddOrUpdate("每日热点数据抓取", () => job.ExecuteAsync(), CronType.Month()); }
/// <summary> /// 图片抓取 /// </summary> /// <param name="service"></param> public static void UseWallpaperJob(this IServiceProvider service) { var job = service.GetService <WallpaperJob>(); RecurringJob.AddOrUpdate("壁纸数据抓取", () => job.ExecuteAsync(), CronType.Month()); }