Skip to Content

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

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.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    Mar 12, 2018 at 10:48 AM

    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.

    Add comment
    10|10000 characters needed characters exceeded

  • Mar 10, 2018 at 03:02 AM


    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!


    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Mar 12, 2018 at 12:58 PM

    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

    Add comment
    10|10000 characters needed characters exceeded