Skip to Content

Scheduling jobs as per your requirement is quite important and difficult task in BODS.

However, now you can do this task, as per your preference.

You can create a schedule of jobs, which will execute jobs one after another, i.e. event based sequential scheduler in BODS 🙂

Step 1 –

          You need ‘Execution command file’ for all the jobs, you want to schedule. If your are already aware of how to create same, you can go to step 2 directly.

a)              Others, Follow the steps as per below document, to get a batch file for each BODS Job-

     http://scn.sap.com/community/data-services/blog/2012/08/22/sap-bods–running-scheduling-bods-jobs-from-linux-command-line-using-third-party-scheduler


Step 2 –

    1. You should get one batch file (for windows), e.g. job_name.bat.              

This file is created to SAP BODS installtion folder. But if you give your own path it will be created on your specified path.

You might not find this file, as folder is hidden sometimes. You can search the file by making all folders visible.


   2. Try to execute this file directly from command prompt.

   3. Make sure this batch file is running as expected, in command prompt.

          4. If not, then cut/paste this batch file to other location & try running.

                   Eg. Type E:\SAP\JOB_NAME.BAT & press enter.

Step 3 –

  Once file is executed on command prompt, we can create our own scheduler in bods designer.

1.      Create a new job & new script.

2.      Type in script  –

Exec(     ‘cmd.exe’                                   ,   ‘E:\\SAP\\JOB_1.BAT’,      8) ;     #Standard command

Print(  ‘ Job_1 Completed….’) ;                                                                     #Print the status of commad to log file


Exec( ‘Batch_file_Path\\JOB_2.BAT’    ,  ” ,    8) ;                                     # cmd.exe  is optional, as batch files are executables

Print(  ‘ Job_2 Completed….’) ;            


print ( Exec(‘cmd.exe’,    ‘Batch_file_Path\\JOB_3.BAT’,   8)   ) ;        # You can print the status of job execution directly.

& So on…………..

(Just take care of escape caracters while giving the file path, as per your operating system)

3.       Save script/job.

Your custom scheduler for many jobs is ready.

This will execute your jobs as per sequence you decide.

You can extend this technique to execute many jobs parallely by adding many scripts/workflow combination.

If you know python/MS DOS batch commands/shell scripts, you can do multiple tasks with this scheduling technique.

To report this post you need to login first.

7 Comments

You must be Logged on to comment or reply to a post.

  1. Michael Eaton

    Can you explain why you would not put the logic into a single job, because workflows support any number of parallel and sequential processing combinations?

    (0) 
    1. DEEPAK KASAR Post author

      Hi Michael,

      Yes, you can can try this with one job only.

      This is a generic scenario mentioned here, as developers usually may use more than one job. However, combination of multiple workflows/data flows/scripts can be used.

      Regards,

      Deepak Kasar.

      (0) 
        1. Jose Joaquin Quezada Erickson

          Michael you are a master and I follow your articles with great passion but I disagree with you in this one. There is a big demand of such solutions. I already had to write a complete engine in SAP BODS 4.1 for a company and they are still asking for more functionalities. The current scheduler is not good enough and need a serious review.

          (0) 
          1. Michael Eaton

            Hello

            If a more powerful scheduling solution is required, there are many available without having to write your own.  However, you are entitled to disagree, we are only voicing opinions.

            Michael

            (0) 
            1. DEEPAK KASAR Post author

              Dear Michael,

              I will be really helpful, if you provide some names/URL of any scheduler, compatible with SAP BODS.

              I tried on google but couldn’t find any. So finally we decided to do it on our own.

              If you are using or know any such tool name, please let me know

              – Thanks in advance.

              (0) 

Leave a Reply