Class TaskService
- Namespace
- Dynamicweb.Scheduling
- Assembly
- Dynamicweb.Core.dll
- Inheritance
-
Task
Service
- Implements
- Inherited Members
Constructors
TaskService()
Properties
Info
Information about the object cache
Property Value
Methods
AddOrUpdateTaskWithAddIn(string, MethodScheduledTaskAddIn, int)
Creates of updated the task found by name with addin settings
public static void AddOrUpdateTaskWithAddIn(string taskName, MethodScheduledTaskAddIn taskAddIn, int repeatIntervalInMinutes = 5)
Parameters
taskName
stringTask name
taskAddIn
MethodScheduled Task Add In Task addin
repeatIntervalInMinutes
intTask repeat interval
ClearCache()
Resets all keys to the default value for objects stored in the object cache
ClearCache(IEnumerable<int>)
Resets the specified keys to the default value for objects stored in the object cache
Parameters
keys
IEnumerable<int>Keys to reset
ClearCache(int)
Resets the specified key to the default value for objects stored in the object cache
Parameters
key
intKey to reset
DeleteById(int)
Deletes task with specific id
Parameters
id
intID of task to be deleted
GetLastExecutionsLogs(int, int)
Parameters
Returns
GetLastExistingTaskName(string)
Gets last existing task name
Parameters
name
stringName of task
Returns
- string
Last existing task name
GetParentTasks()
Gets the main tasks
Returns
GetTaskById(int)
Gets a task by id
Parameters
id
intIdentifier of the task
Returns
- Task
Task, if found, otherwise null.
GetTaskByName(string)
Gets last existing task name
Parameters
name
stringName of task
Returns
- Task
Last existing task name
GetTasks()
Gets all tasks
Returns
- IEnumerable<Task>
All tasks
GetTasksByAddInType(Type)
Gets the tasks which assembly matches the specified type.
Parameters
type
TypeThe task type, which is inherited from Base
Scheduled Task Add In
Returns
GetTasksByAddInType<T>()
Gets the tasks which assembly matches the specified type.
Returns
Type Parameters
T
GetTasksByParentId(int)
Gets the sub tasks from the parent task
Parameters
parentId
intTask parent id
Returns
Save(Task)
Saves a task
Parameters
task
TaskThe task
UpdateEnabled(int, bool)
Change active state of a task
Parameters
UpdateRuntime(int, DateTime, DateTime)
Change runtime information for a task