PdcSchedulerTasks.Active

From External Bemet Wiki
Jump to navigation Jump to search

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

When this code example runs in an script started from the scheduler, it creates a file with the result and the text of the task.

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).