The parameters that must be entered in the TriggerScheduledTask structure depend on the type of schedule defined for the scheduled task.

Indeed, a scheduled task can be: run on a daily, weekly or monthly basis, run once, run when the computer is started, run when the system is idle.

The type of schedule defined for the scheduled task is specified by the TriggerScheduledTask.Type variable. The table below presents this variable as well as all the other variables of the TriggerScheduledTask structure.

TriggerScheduledTask.Type

This variable can take one of the following values:

schedLogon

Run when starting a session.

schedSystemStart

Run when the system is started.

schedWeekly

Run on a weekly basis.

schedIdle

Run when the system is idle.

schedMonthly

Run on a monthly basis.

schedDaily (default value)

Run on a daily basis

schedOnce

Run once.

TriggerScheduledTask.ForcedStop

Boolean.If this parameter is set to True, stops the task currently run when the repeat duration is exceeded. This variable is set to False by default. Type of associated task: Daily task, weekly task, monthly task and task run once.

TriggerScheduledTask.Date

DateDate when the task will be run. Type of associated task: Task run once only.

TriggerScheduledTask.BeginDate

DateDate from which the task can be performed. By default, this date corresponds to the creation date of the task. Type of associated task: Daily task, weekly task and monthly task.

TriggerScheduledTask.EndDate

DateDate from which the task will no longer be performed. To specify no end date, use an empty string. No end date is specified by default. Type of associated task: Daily task, weekly task and monthly task.

TriggerScheduledTask.IdleWait

Integer in minutesAmount of idle time required before performing the task. This duration is set to 10 minutes by default. Type of associated task: Run when the system is idle

TriggerScheduledTask.RepeatDuration

Integer in minutes.The task will be repeated during the specified duration. This duration is set to 60 minutes by default. Type of associated task: Daily task, weekly task and monthly task.

TriggerScheduledTask.Time

TimeTime when the task will be run. This variable is set to 9:00 AM by defaultType of associated task: Daily task, weekly task, monthly task and task run once.

TriggerScheduledTask.Interval

IntegerNumber of days or number of weeks between each execution. This variable is set to 1 by default. Type of associated task: Daily task or weekly task.

TriggerScheduledTask.Day

IntegerThe task will be performed on this day of the month. Can correspond to:

The task is performed every 1st of each month by default.Type of associated task: Monthly task

TriggerScheduledTask.DayOfWeek

IntegerThe task will be performed on this day of the week. Corresponds to the name of a day + its position in the monthExample: 1st Monday of the month: schedMonday + schedFirstThe available values are: schedMonday, schedTuesday, schedWednesday, schedThursday, schedFriday, schedSaturday, schedSundayThe task is performed every Monday by default.Type of associated task: Weekly task

TriggerScheduledTask.Caption

Character stringCaption of the schedule, which means caption of the event that triggers the scheduled task.This variable is read-only and it is updated when reading a schedule (SchedulerTriggerProperties)

TriggerScheduledTask.Month

IntegerThe task will be performed during this month. Corresponds to one or more months: schedJanuary, schedFebruary, schedMarch, schedApril, schedMay, schedJune, schedJuly, schedAugust, schedSeptember, schedOctober, schedNovember, schedDecember.Example: schedJanuary + schedAugust: the task will be performed in January and in August.The task is performed every month by default.Type of associated task: Monthly task

TriggerScheduledTask.RepeatInterval

Integer in minutesThe task will be repeated during this interval (0 if the task must be performed once). The task is not repeated by default.Type of associated task: Daily task, weekly task, monthly task and task run once.

Variables that can be used according to the type of task

The table below presents the variables that can be used according to the type of task: