Is the page number going to be consistent between all runs or is this changing?
If it's consistent, the two recommended approaches is either creating a system property and using the following to access it from the script:
maximo = MXServer.getMXServer()
maximo.getProperty("PROPNAME")
The second method could be to add it to the cron task instances parameters under SCRIPTARG. If you are already using SCRIPTARG, consider appending multiple arguments and breaking them up with |
I.E: ARG1 | ARG2 | ARG3
As for logging, if you use service.log throughout your script, it should be shown in the logs when the script runs, depending on the log level set.