Hello,
I want to setup a global counter, so when the counter hits specific number, i want to send email (problems jobs for testing).
But it keeps failing when it gets to the line to set the global data.
It fails at the "s.setGlobalData("myCounter", counter.toString());"
Anu ideas why?
This is a sample of my script:
var counter = parseInt(s.getGlobalData("myCounter", "0"));
counter++;
s.setGlobalData("myCounter", counter.toString());
If (counter === 10){
job.sendToData(3, job.getPath() );
}
Setting up and using a global counter
Re: Setting up and using a global counter
setGlobalData( scope : String, tag : String, value : String, persistent : Boolean )
The call expects 3 parameters, not 2 as in your code. The fourth one is optional.
The call expects 3 parameters, not 2 as in your code. The fourth one is optional.
Re: Setting up and using a global counter
Hello and thank you! i wasn't using scope!