cancel
Showing results for 
Search instead for 
Did you mean: 

Shedule a Batch job to run every one min

0 Kudos


Hello all,

I'm new to data services . My requirement is to shedule a batch job to run every minute .

Please help me on this.

Thanks,

David king J

Accepted Solutions (1)

Accepted Solutions (1)

DayaJha
Active Contributor
0 Kudos

Hi David,

Regarding your query below is the suggestion from my side:

Option I: Schedule the Job from Data Services Management Console below is the steps.

(a) Log in in SAP Business Objects Data Services Management console

Link:<Server Name>:<Port Number>/DataServices

(b) Go to Administrator Tab and click on Batch Job

(c) Select Batch Job and in right hand side click on Add schedule

Where you have Option to schedule as per your requirement

Note : You can use Data Services scheduler Or BOE scheduler.

Option II: Schedule the Job from UNIX environment below is the steps.

(a) Cron Tab Access rights required

for checking cron tab rights use below command

crontab -l  ---> List of schedule Jobs

crontab -e  ---> for editing or creating new schedule

(b)Log in in SAP Business Objects Data Services Management console

Link:<Server Name>:<Port Number>/DataServices

(c) Go to Administrator Tab and click on Batch Job

(d) Select Batch Job and in right hand side click on Export execution command

(e) Update the details regarding JOb Server, Global Variable if used in the Job and click on export;Now check the "SHELL Schript" .SH file mentioned in Data Services management console link

(f) Copy and Paste the Script in your desired location

(g) Then create SHELL script, below is sample example

Test:

1 * * * * /usr/sap/BODS/BO_Script/ABC.SH

For cronjobs details please refer below link

Run crontab (cron jobs) Every 10 Minutes

Note: As Michael suggested that option is also good, you can also implement the same.

Hope this will help!!!!!

Thanks,

Daya

0 Kudos

Hi daya ,

     How can we monitor the sheduled jobs using option 1 you have mentioned from BODS?

Thanks ,

David king J.


DayaJha
Active Contributor
0 Kudos

Hi David,

After creation of schedules all jobs details are avaible in Data Services management console.

Please refer below screenshot for your reference.

Thanks,

Daya

Answers (2)

Answers (2)

Former Member
0 Kudos

Hello

I doubt you really want to execute a batch job every minute, that level of granualrity of repetition should be built into the job.  Running a job every minute is mis-using the technology.

If you need to execute some logic frequently, consider using a while loop and the sleep function (the old school way) or with later versions of Data Services you can configure a workflow for continuous execution (the new school).

Michael

0 Kudos

Hi ,

can you please eloborate scheduling using while loop and sleep() command.

Thanks and regards,

David king J.

Former Member
0 Kudos

Hi,

Create an export execution command to generate a .bat file.

Inside the script call the .bat file using cmd.exe - exec ('cmd.exe','path of .bat file',8);

use sleep (60000); in the script

Use a if condition to check for the table or file.

syntax as below

if(file_exists(filename))

exec ('cmd.exe','path of .bat file',8);

sleep (60000);


Arun

0 Kudos

Hi Arun ,

Can we do that with the Dataservices sheduler?

Thanks,

David king J.

deepak_chodha
Explorer
0 Kudos

Hi David,

Once you have created a job you can easliy schedule it using DataServices Management Console.

1. Goto http://<servername>:<port>/DataServices like http://host2644:8080/DataServices

2. Click on Administrator tile.

3. On left side navigation panel select Batch -> select your repository-> Batch Job configuration.

4. Add a schedule with your requirements and activate it.

You can schdule using BOE or OS user. For more reference you can check: http://help.sap.com/businessobject/product_guides/sbods42/en/ds_42_mgmt_cons_en.pdf

Happy HANA, Deepak.

Former Member
0 Kudos

Hi David,

In the schedule of management console there are two options - one weekly and daily, the other multiple times in a day. You could use the second option to schedule multiple times for your requirement. I don't recall the minute option but try that and see how it works.

Arun

0 Kudos

Hi Arun ,

My Job server is on UNIX .

Do i have export .sh file????

Can you please hel me with the alternate.

Thanks,

David king J.