Summary

When a script that references the WScript object is run by adTempus, the script will fail with an error similar to the following:

Error 424: Object required: 'WScript'.

This occurs because scripts run by adTempus are hosted by adTempus, rather than by the Windows wscript or cscript host processes. It is the host process that exposes the WScript object to the script, and adTempus does not implement or expose such an object.

Workaround

Instead of having adTempus run the script using a Script Execution Task or running the script in an action, run the script using a Program Execution task. When the target of a Program Execution Task is a script, adTempus invokes the Windows cscript host process to run the script, and this process exposes the WScript object to the script.

Unfortunately scripts run in this fashion lose some functionality that is available to scripts run by Script Execution Tasks and Script Actions, such as the ability to modify the environment variables used by the job or log messages using the LogMessage method.

Scripts run outside of adTempus can return an exit code to adTempus by using the WScript.Quit method.

Note: If the only WScript method you are using is "WScript.CreateObject" you can replace this call with a simple "CreateObject" (not referencing WScript) and your script will work correctly when run internally by adTempus.

Status

No change is planned to address this limitation. Users are encouraged to use one of the workarounds described above or to migrate their scripts to one of the .NET scripting languages supported by adTempus.