PDA

View Full Version : How best to kill a scriptJob from a procedure


ronviers
11-29-2008, 09:43 PM
Hi,
I have a scriptJob that works using this:
string $updateSpans_jNum=`scriptJob -ac proxyRebuild_rc.spans updateSpans`;

And I want to kill it from another procedure using this:
scriptJob -k $updateSpans_jNum;

But I get this:
// Error: Error while parsing arguments. //

How come I get the error and what is the best way to kill a scriptJob from a procedure?

Thanks,
Ron

ginodauri
11-30-2008, 12:10 AM
I'm not sure you should use string.

Maybe something like this will work:

int $jobA = `scriptjob ....`;

global proc killScriptJob ( int $jobA) {

scriptJob -kill $jobA;

}

ronviers
11-30-2008, 12:43 AM
That makes sense. I should have noticed that. I will be more careful.

Thanks for the help,
Ron

CGTalk Moderation
11-30-2008, 12:43 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.