Пример #1
0
        public JsonResult AddJob1([FromServices] RecurringJobManager jobManager)
        {
            string id = Guid.NewGuid().ToString("N");

            jobManager.AddOrUpdate(id, () => MyJob.即時任務(null), Cron.Minutely);

            return(Json(new { success = true, id }));
        }