Hello,
I have in a JobDefinition of type RedwoodScript a PostrunningAction which searches in stderr.log for a defined string:
import java.io.BufferedReader; import java.io.FileReader; import com.redwood.scheduler.api.model.JobFile; { String errorSearch = "xxx"; JobFile jf = jcsJob.getJobFileByName("stderr.log"); //zeilenweise lesen BufferedReader in = null; in = new BufferedReader(new FileReader(jf.getFileName())); String zeile = null; while ((zeile = in.readLine()) != null && zeile.startsWith(errorSearch)) { jcsOut.println(zeile); } }
It is running fine.
If I insert this PostrunningAction to a JobDefintion of type Bash, it isn't working. Error message: No such file or directory.
In JobDefinition(Bash) the path of stderr.log is shown as
rdfs://server:1565/readFile?path=/usr/sap/sap-bpa/agent/x0d/var/SAP_X0D_09/server/jobs/5359/1094/JobFiles/stderr.log
In JobDefinition(Redwood) the path of stderr.log is shown as
/usr/sap/X0D/J09/j2ee/cluster/server0/scheduler/log/53580000-53589999/53589418/abc_53589418_2.log
What can I do that the jobfile will be found also in the JobDefinition(Bash)?
Best regards
Dana