cancel
Showing results for 
Search instead for 
Did you mean: 

job scheduling based on sap job log

former_member199052
Participant
0 Kudos

Hi,

We have a need to setup Cronacle jobs that will control the job schedule based on what is in the SAP job log or what is returned from the SAP job log.  In other words, if the job log says "not all data processed", we want to sleep for some time and then restart the job.

Any help is greatly appreciated.

Best Regards,

Rick

Accepted Solutions (1)

Accepted Solutions (1)

h_carpenter
Active Contributor
0 Kudos

Hi Rick,

Which version are you running, you have either post running action to check the log or JobFileSearch (version 9, only, afaik).

In the post running action you can use RedwoodScript to search for a given string, "not all data processed", then use Thread.sleep(30000) [sleep 30 seconds] then issue jcsJob.restart();

Regards,

HP

former_member199052
Participant
0 Kudos

Hi,

Thank you for your reply.  We are on version 9.0.14.2.  So you call a redwood script after the SAP job runs and query the string from the log.  Then, sleep for some time and restart (start a new instance of the job)?

Do you have a sample of the Script?

Thanks again for your help.

Best Regards,

Rick

gmblom
Active Contributor
0 Kudos

Hello,

Have a look at the File Search tab on the Definition. You can put the job to Error when you find "not all data processed", and use the Restart Behavior tab to restart with Delay on status Error.

This way you use all build in functionality without having to use scripting.


Regards Gerben

former_member199052
Participant
0 Kudos

Hi Gerben,

I think this might be the answer.  Can you tell me what I should put for the processing order?

Thank you for your help!

Best Regards,

Rick

gmblom
Active Contributor
0 Kudos

Hi Rick,

as you can do multiple searches and use the break option as well you can make some different type of scenarios. In that case you will have to organize the order.

With just the 1 search you can feed any arbitrary number of course.

Regards Gerben

former_member199052
Participant
0 Kudos

Hi Gerben,

I believe this is the scenario I was looking for.  Thanks so much for your help.  I have marked this thread as answered.

Best Regards,

Rick

Answers (0)