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
id
int- ID of task to be deleted
GetLastExistingTaskName(string)
Gets last existing task name
public string GetLastExistingTaskName(string name)
Parameters
name
string- Name of task
Returns
- string
- Last existing task name
GetTaskById(int)
Gets a task by id
public Task GetTaskById(int id)
Parameters
id
int- Identifier of the task
Returns
- Task
- Task, if found, otherwise null.
GetTaskByName(string)
Gets last existing task name
public Task GetTaskByName(string name)
Parameters
name
string- 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
task
Task- The task
UpdateEnabled(ActivationVariant, string, bool)
Change active state of matching tasks
public int UpdateEnabled(ActivationVariant type, string target, bool enabled)
Parameters
type
ActivationVariant- Type of task
target
string- Task target
enabled
bool- 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)