+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Schedule Task In Sitefinity 8.0

Schedule Task In Sitefinity 8.0

1 posts, 0 answered
  1. David
    David avatar
    10 posts
    Registered:
    20 Jul 2014
    20 Jul 2015
    Link to this post

    Hello All,

     I found the code to run task every 5 minutes,

    SchedulingManager schedulingManager = SchedulingManager.GetManager();
    LoadBalanceTask newTask = new LoadBalanceTask()
    {
                    Key = SampleKey,
                    ExecuteTime = DateTime.UtcNow.AddMinutes(5),
    };
    schedulingManager.AddTask(newTask);
    schedulingManager.SaveChanges();

     May I config for this task run everyday at 1 AM.

     Thank you so much for any help.

1 posts, 0 answered