TestimoX

API Reference

Class

TaskScheduler

Namespace ComputerX.ScheduledTasks
Assembly ComputerX
Modifiers static

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: Boolean

Deletes a task at the specified path.

Parameters

path System.String requiredposition: 0
computer System.String = null optionalposition: 1
options ComputerX.ScheduledTasks.TaskSchedulerOptions = null optionalposition: 2
public static Boolean Disable(String path, String computer = null, TaskSchedulerOptions options = null) #
Returns: Boolean

Disables a task at the specified path.

Parameters

path System.String requiredposition: 0
computer System.String = null optionalposition: 1
options ComputerX.ScheduledTasks.TaskSchedulerOptions = null optionalposition: 2
public static Boolean Enable(String path, String computer = null, TaskSchedulerOptions options = null) #
Returns: Boolean

Enables a task at the specified path.

Parameters

path System.String requiredposition: 0
computer System.String = null optionalposition: 1
options ComputerX.ScheduledTasks.TaskSchedulerOptions = null optionalposition: 2
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 optionalposition: 0
Target computer (null or "." for local).
suspicious System.Boolean = false optionalposition: 1
Whether to compute and include suspicion data.
onlySuspicious System.Boolean = false optionalposition: 2
When true and suspicious is also true, returns only suspicious tasks.
options ComputerX.ScheduledTasks.TaskSchedulerOptions = null optionalposition: 3
Connection and scope options (folder, credential, timeout).
suspicionOptions ComputerX.ScheduledTasks.SuspicionOptions = null optionalposition: 4
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: ScheduledTaskInfo

Gets a single task by full path. When suspicious is true, item includes suspicion fields.

Parameters

path System.String requiredposition: 0
computer System.String = null optionalposition: 1
suspicious System.Boolean = false optionalposition: 2
options ComputerX.ScheduledTasks.TaskSchedulerOptions = null optionalposition: 3
suspicionOptions ComputerX.ScheduledTasks.SuspicionOptions = null optionalposition: 4
public static ScheduledTaskInfo GetSuspicion(ScheduledTaskInfo info, SuspicionOptions options = null) #
Returns: ScheduledTaskInfo

Computes suspicion flags, score, reasons and tags for a single task info without querying the scheduler.

Parameters

info ComputerX.ScheduledTasks.ScheduledTaskInfo requiredposition: 0
Task info to evaluate.
options ComputerX.ScheduledTasks.SuspicionOptions = null optionalposition: 1
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: Boolean

Triggers a task to run immediately.

Parameters

path System.String requiredposition: 0
computer System.String = null optionalposition: 1
options ComputerX.ScheduledTasks.TaskSchedulerOptions = null optionalposition: 2
public static Boolean SetExec(TaskDefinitionSpec spec, String computer = null, TaskSchedulerOptions options = null) #
Returns: Boolean

Creates or updates a task with a single Exec action and optional triggers/principal.

Parameters

spec ComputerX.ScheduledTasks.TaskDefinitionSpec requiredposition: 0
computer System.String = null optionalposition: 1
options ComputerX.ScheduledTasks.TaskSchedulerOptions = null optionalposition: 2