Mike
Mike

Reputation: 1

groovy script does not run through TWS when using "-cp" option

I have a groovy script which runs fine when logged in interactively on a Windows 2003 R2 box. When I schedule this as a batch job through Tivoli Workload Scheduler (TWS) the script does not run but returns "finish HighVolumeLetters.groovy for High Volume Letters - rc -1073741819".

I've looked for this RC and it seems to be same kind of access violation message. Other jobs I run on this box through TWS run perfectly, and if I do not specify a class path with the -cp options, the groovy script is fine as well.

It's just when I specify a classpath using -cp is when it fails.

Upvotes: 0

Views: 184

Answers (1)

snaguber
snaguber

Reputation: 51

I have no idea what a "groovy script" is but I know TWS. When you have an issue alike "it works when I start it manually but not when TWS runs it" it is 99% of the time a variable that is not set when TWS runs the job.

When you run a job with TWS, it does not load the same environment variables as when you start an interactive session. As a proof, create a TWS job that runs the "set" command using you user, grab the logs and compare with the output of this same "set" command if you run it manually in a command prompt.

You have to force the loading of variables using the jobmanrc file (.jobmanrc in unix). Please refer to TWS documentation on JOBMANRC usage.

Upvotes: 0

Related Questions