API Reference
Class
TaskScheduler
High-level helpers for Windows Task Scheduler (Exec-centric), following the ComputerX static Get/Set style.
Inheritance
- Object
- TaskScheduler
Methods
public static Boolean Delete(String path, String computer = null, TaskSchedulerOptions options = null) #Returns:
BooleanDeletes a task at the specified path.
Parameters
- path System.String
- computer System.String = null
- options ComputerX.ScheduledTasks.TaskSchedulerOptions = null
public static Boolean Disable(String path, String computer = null, TaskSchedulerOptions options = null) #Returns:
BooleanDisables a task at the specified path.
Parameters
- path System.String
- computer System.String = null
- options ComputerX.ScheduledTasks.TaskSchedulerOptions = null
public static Boolean Enable(String path, String computer = null, TaskSchedulerOptions options = null) #Returns:
BooleanEnables a task at the specified path.
Parameters
- path System.String
- computer System.String = null
- options ComputerX.ScheduledTasks.TaskSchedulerOptions = null
public static IEnumerable<ScheduledTaskInfo> Get(String computer = null, Boolean suspicious = false, Boolean onlySuspicious = false, TaskSchedulerOptions options = null, SuspicionOptions suspicionOptions = null) #Returns:
IEnumerable<ScheduledTaskInfo>Enumerates tasks on a computer. When suspicious is true, items include suspicion fields.
Parameters
- computer System.String = null
- Target computer (null or "." for local).
- suspicious System.Boolean = false
- Whether to compute and include suspicion data.
- onlySuspicious System.Boolean = false
- When true and suspicious is also true, returns only suspicious tasks.
- options ComputerX.ScheduledTasks.TaskSchedulerOptions = null
- Connection and scope options (folder, credential, timeout).
- suspicionOptions ComputerX.ScheduledTasks.SuspicionOptions = null
- Heuristic controls (safe roots, lolbins, whitelists).
public static ScheduledTaskInfo GetOne(String path, String computer = null, Boolean suspicious = false, TaskSchedulerOptions options = null, SuspicionOptions suspicionOptions = null) #Returns:
ScheduledTaskInfoGets a single task by full path. When suspicious is true, item includes suspicion fields.
Parameters
- path System.String
- computer System.String = null
- suspicious System.Boolean = false
- options ComputerX.ScheduledTasks.TaskSchedulerOptions = null
- suspicionOptions ComputerX.ScheduledTasks.SuspicionOptions = null
public static ScheduledTaskInfo GetSuspicion(ScheduledTaskInfo info, SuspicionOptions options = null) #Returns:
ScheduledTaskInfoComputes suspicion flags, score, reasons and tags for a single task info without querying the scheduler.
Parameters
- info ComputerX.ScheduledTasks.ScheduledTaskInfo
- Task info to evaluate.
- options ComputerX.ScheduledTasks.SuspicionOptions = null
- Optional heuristic options; when null, defaults are used.
Returns
Enriched ScheduledTaskInfo including suspicion fields.
public static Boolean RunNow(String path, String computer = null, TaskSchedulerOptions options = null) #Returns:
BooleanTriggers a task to run immediately.
Parameters
- path System.String
- computer System.String = null
- options ComputerX.ScheduledTasks.TaskSchedulerOptions = null
public static Boolean SetExec(TaskDefinitionSpec spec, String computer = null, TaskSchedulerOptions options = null) #Returns:
BooleanCreates or updates a task with a single Exec action and optional triggers/principal.
Parameters
- spec ComputerX.ScheduledTasks.TaskDefinitionSpec
- computer System.String = null
- options ComputerX.ScheduledTasks.TaskSchedulerOptions = null
Inherited Methods
public override Boolean Equals(Object obj) #Returns:
BooleanInherited from Object
Parameters
- obj Object