Invoke(Mb: IMetabase);
Mb is a repository within that the task is executed.
The Invoke method generates the task event.
Executing the example requires that the repository contains a scheduled tasks container with the TASK_CONTAINTER identifier.
Sub UserProc;
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 UserProc;
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: