Code:
if not TaskScheduler.DoesJobExist("Mytask") then
-- schedule a silent update check at logon for my application
-- the updater is best set to "silent until update is available"
TaskScheduler.CreateJob("System", "(ignored)", "ONLOGON", 0, "Mytask", SessionVar.Expand("%ApplicationDataFolderCommon%\\TrueUpdateClient.exe"), "/sc monthly /d 1 /ru "System"");
error = Application.GetLastError();
if (error ~= 0) then
Dialog.Message("Error", _tblErrorMessages[error], MB_OK, MB_ICONEXCLAMATION);
else
Dialog.Message("Info", "Task was created.", MB_OK, MB_ICONINFORMATION);
end
end