Creating a Scheduled Tasks Container

Sub UserProc;
Var
    MB: IMetabase;
    CrInfo: IMetabaseObjectCreateInfo;
    MObj: IMetabaseObject;
Begin
    MB := MetabaseClass.Active;
    CrInfo := MB.CreateCreateInfo;
    CrInfo.ClassID := MetabaseObjectClass.KE_CLASS_TASK_CONTAINTER;
    CrInfo.Id := "NewSTCont";
    CrInfo.Name := "New scheduled tasks container";
    CrInfo.Parent := MB.Root;
    MObj := MB.CreateObject(CrInfo).Edit;
    MObj.Save;
End Sub UserProc;

After executing the example a new scheduled tasks container is created in the repository root folder.

See also:

Examples