PdcSchedulerTasks.Active
Declaration
Active as PdcSchedulerTask
Description
Notes
This property retrieves the active task when a script is started from the scheduler.
A script can get some properties with data of the active task.
Code example
This code example opens a schedule with ID 1 and returns its schedule name in a msgbox.
sStartMain
Sub sStartMain
dim objTask
dim strlstText
set strlstText = TStringList.Create
set objTask = pdc.SchedulerTasks.Active
if isvalid(objTask) then
strlstText.Add "An active determined"
strlstText.Add objTask.Text
else
strlstText.Add "No active task"
end if
strlstText.SaveToFile "C:\Temp\TestTask.txt"
strlstText.Free
End Sub
Availability
Available since November 2015 (from version 5.0).