IScheduledInvoke.Invoke

Syntax

Invoke(Mb: IMetabase);

Parameters

Mb is a repository within that the task is executed.

Description

The Invoke method generates the task event.

Example

Executing the example requires that the repository contains a scheduled tasks container with the TASK_CONTAINTER identifier.

Sub Main;

Var

MB: IMetabase;

Cont: IScheduledTasksContainer;

Tasks: IMetabaseObjectDescriptors;

Task: IScheduledTask;

Invoke: IScheduledInvoke;

i: Integer;

Begin

MB := MetabaseClass.Active;

Cont := MB.ItemById("TASK_CONTAINTER").Bind As IScheduledTasksContainer;

Tasks := Cont.Tasks;

Task := Tasks.Item(0).Bind As IScheduledTask;

Invoke := Task.CreateInvokeEvent(DateTime.Now);

Invoke.Invoke(MB);

End Sub Main;

After executing the example the execution event of the first task in the scheduled tasks container is created. This event will be executed. The record taking into account current time will be added to the history.

See also:

IScheduledInvoke