The following example sets the current task to trigger only when the spooler changes (i.e. when a print job is added, removed or completed from the printer queue) or the system date/time changes
Sub Main
' Set the task to trigger on Windows Events
CurrentTask.Triggers = 2
' Set to trigger on spooler or time change
CurrentTask.Events = 33
End Sub