Issues running script

Issues running script

Hi again,


Following my last topic, I'm now pursuing a script that is allowed on every server. 

The previous script had:


  1. Set objTaskService = CreateObject("Schedule.Service")

    objTaskService.Connect("servername.domain.com")
    Set objRootFolder = objTaskService.GetFolder("\")

    Set objTask = objRootFolder.GetTask("Cleanup")


    objTask.Run vbNull

This ran with no issues.

Now, I'm trying:

  1. Set objTaskService = CreateObject("Schedule.Service")

  2. objTaskService.Connect()
  3. Set objRootFolder = objTaskService.GetFolder("\")

  4. Set objTask = objRootFolder.GetTask("Cleanup")


  5. objTask.Run vbNull


When I try to run this, I get this error:

Script output:
C:\OpManager_302_1455104156707.vbs(6, 1) (null): The system cannot find the file specified. 

What could this be?

Thanks,

Nuno Silva

                New to ADSelfService Plus?