private void RemoveTaskFromSchedule(TaskSchedule taskSchedule) { // var jsonTaskSchedule = JsonTaskInfoSerializer.Serialize(taskSchedule); // _taskQueue.Backend.RemoveFromList(ScheduleBackupKey, jsonTaskSchedule); _scheduledTasks.Remove(taskSchedule.TaskKey); }
private void AddTaskToSchedule(TaskSchedule taskSchedule) { _scheduledTasks[taskSchedule.TaskKey] = taskSchedule; taskSchedule.ClearLastRunTime(); // var jsonTaskSchedule = JsonTaskInfoSerializer.Serialize(taskSchedule); // _taskQueue.Backend.AddToList(ScheduleBackupKey, jsonTaskSchedule); }
internal void AddScheduledTask(TaskInfo taskInfo, TimeSpan interval, string taskName) { _scheduledTasks[taskName] = new TaskSchedule(taskInfo, interval, _taskQueue.Backend); }
internal void AddScheduledTask(TaskInfo taskInfo, TimeSpan interval, string taskName) { // TODO: Support Scheduled Tasks with args _scheduledTasks[taskName] = new TaskSchedule(taskInfo, interval, _taskQueue.Backend); }