Skip to Content
0

How can I write a script within BODS to check a database table every 15 mins once?

Mar 09 at 09:19 PM

76

avatar image
Former Member

Here are the details: I need to check my AL_HISTORY table every 15 mins once to check whether a Batch job has completed it execution. So I need to write this code and let it run as soon as the Batch job begins it execution.

Could someone share design ideas to run this code every 15 mins once within a single job? Or do you have other suggestions? I am using SAP Data Services Designer 14.2.8

I prefer this recurring script to be part of a single job that keeps running until the Batch completes it execution.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Rajan Burad Mar 10 at 03:02 AM
0

Hello,

You can do it via two methods:

1.) If you've access to AL_HISTORY table in the database then fire select query in the database itself to get the status: "select * from AL_HISTORY"

2.) Create a job containing a script with your SQL statement and schedule it after every 15 minutes, post starting of your main job, from Management Console. Select option "Multiple times a day". Try this and let us know if it works!

Thanks!

Share
10 |10000 characters needed characters left characters exceeded
Ravi kiran Pagidi Mar 12 at 10:48 AM
0

Hello DLP RAM,

Take a script before dataflow in your job and use sleep() function to make job sleep for sometime and sql() function to check the status of the job in AL_HISTORY table and include these two in a while loop.

End the while loop when the job status in AL_HISTORY is SUCCESS, if not SUCCESS job will sleep(10000) for 10 minutes and then again check for the status of the job.

Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Mar 12 at 12:58 PM
0

All above ans is correct , But If my understading is correct then , You needs to start some other task as soon as the jobs finished is't ?(And the jobs which you needs to run is out of BODS jobs)

If the above requirement is correct then The best way is ,Create a simple .txt file after successfully completion of job,And run a simple .Bat or .sh file which handle your other dependent jobs .

Job needs to use the BODS metadata file

Share
10 |10000 characters needed characters left characters exceeded