Class TaskService
- Namespace
 - Dynamicweb.Scheduling
 
- Assembly
 - Dynamicweb.Scheduling.dll
 
public class TaskService
  - Inheritance
 - 
      
      TaskService
 
- Inherited Members
 
Methods
DeleteById(int)
Deletes task with specific id
  
  public void DeleteById(int id)
  Parameters
idint- ID of task to be deleted
 
GetLastExistingTaskName(string)
Gets last existing task name
  
  public string GetLastExistingTaskName(string name)
  Parameters
namestring- Name of task
 
Returns
- string
 - Last existing task name
 
GetTaskById(int)
Gets a task by id
  
  public Task GetTaskById(int id)
  Parameters
idint- Identifier of the task
 
Returns
- Task
 - Task, if found, otherwise null.
 
GetTaskByName(string)
Gets last existing task name
  
  public Task GetTaskByName(string name)
  Parameters
namestring- Name of task
 
Returns
- Task
 - Last existing task name
 
GetTasks()
Gets all tasks
  
  public IEnumerable<Task> GetTasks()
  Returns
- IEnumerable<Task>
 - All tasks
 
Save(Task)
Saves a task
  
  public void Save(Task task)
  Parameters
taskTask- The task
 
UpdateEnabled(ActivationVariant, string, bool)
Change active state of matching tasks
  
  public int UpdateEnabled(ActivationVariant type, string target, bool enabled)
  Parameters
typeActivationVariant- Type of task
 targetstring- Task target
 enabledbool- Task active state
 
Returns
- int
 - The number of affected tasks
 
UpdateEnabled(int, bool)
Change active state of a task
  
  public void UpdateEnabled(int id, bool enabled)
  Parameters
UpdateRuntime(int, DateTime, DateTime)
Change runtime information for a task
  
  public void UpdateRuntime(int id, DateTime previousRuntime, DateTime nextRuntime)