Class
ScheduledTasks

The ScheduledTasks class allows addition of jobs by name. It ensures that ONE instance of the named job will occur at some point in the future, between 0 and a specified max delay. If you queue multiple instances of the same-named Task, it's only done once.

Definition

Namespace:Fiddler

Assembly:FiddlerCore.dll

Syntax:

cs-api-definition
public static class ScheduledTasks

Inheritance: objectScheduledTasks

Inherited Members object.GetType()object.MemberwiseClone()object.ToString()object.Equals(object)object.Equals(object, object)object.ReferenceEquals(object, object)object.GetHashCode()

Methods

CancelWork(string)

Remove a job with a specific name before it is executed.

Declaration

cs-api-definition
public static bool CancelWork(string sTaskName)

Parameters

sTaskName

string

Returns

bool

True if the job was removed successfully

ScheduleWork(string, uint, SimpleEventHandler)

Schedule a new job with a specific name and max delay to be run by the periodic worker instance

Declaration

cs-api-definition
public static bool ScheduleWork(string sTaskName, uint iMaxDelay, SimpleEventHandler workFunction)

Parameters

sTaskName

string

The name of the new job. If it is already added then no changes will be made.

iMaxDelay

uint

The max delay in milliseconds to wait before starting the job

workFunction

SimpleEventHandler

The handler to call when starting the job

Returns

bool

True if the job was added successfully