Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
Former Member

Background:

Xsengine Background jobs can be scheduled for SQL script procedures and XSJS functions.

Prerequisites:

  1. ) Add a section “scheduler” to xsengine.ini with property enabled = true

  And run reconfigure service for the xsengine as SYSTEM user under Landscape\services tab

This will enable the XSengine job scheduling.

  1. )    You got access to role sap.hana.xs.admin.roles::JobAdministrator and sap.hana.xs.admin.roles::HTTPDestAdministrator

Setup:

Can be done either in HANAstudio development perspective or HANA web based development editor, which can be reached through:

http://< HOSTNAME>:8000/sap/hana/xs/ide/editor/

Sample using Webbased development editor:

Creating a new subpackage for my jobs for an easier overview:

Creating new .xsjob file:

Code sample:

{

   "description": "Background job test",

   "action": "<package_path>::<procedure_or_function>",

   "schedules": [

       {

         "description": "Background job test",

         "xscron": "* * * * * * */*"

     

       }

   

    ]

}

Xscron samples:

2013 * * fri 12 0 0 -> Run the job every Friday in 2013 at 12:00.

* * 3:-2 * 12:14 0 0 -> Run every hour between 12:00 and 14:00 every day between the third and second-to-last day of the month.

* * * -1.sun 9 0 0 -> Run the job on the last Sunday of every month at 09:00.

Enabling the scheduling:


Open XSengine Administration:

http://<HOSTNAME>:8000/sap/hana/xs/admin

  Browse to your job and specify a USER and PASSWORD under which the Job should be executed, tick the active checkbox and save. (A dedicated user with the required access should be created for this task)



The job will run not and its status can be monitored in the Job log section:

  1. e.g.

Or with the tables:

"_SYS_XS"."JOBS"

"_SYS_XS"."JOB_SCHEDULES"

"_SYS_XS"."JOB_LOG"

Hope this document will help you to overcome the usage of external tools to call a procedure. Now HANA Supports this feature.

Regards,

Sharath Borra

4 Comments
Labels in this area