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!
Showing results for 
Search instead for 
Did you mean: 


This tutorial try to explain how to schedule a XS job to call strore procedure.

We need to change the SAP HANA perspective to SAP HANA Development.

We create a XS Project with a new package as follow:

In the next step we must to set the project name

We select the workspace:

Here we can create the XS JavaScript file, so we set the name of the file:

In order to schedule a XS Job we need to create a new file under out package:

Please, select XS Job Scheduler File:

Set the parent folder (previously created ZJUANDE_IBO) and set the XS JavaScript file name:

Now we have the following file structure:

Here the example of xsjob file:

Important is action. The action keyword enables you to define the function to run as part of the XS job, for example, an XS JavaScript or an SQLScript. The following syntax is required:

“action” : “<package.path>:<XSJS_Service>.xsjs::<functionName>”

The schedule for the specified task (defined in the “action” keyword); the schedule is defined using cron-like syntax. Following some examples:

2016 * * fri 12 0 0

Every Friday of 2016 at 12:00 hours

* * * * 12 0 0

Every day of every year at 12:00 hours

* * * * 12 0 *

Every second of every day of every year

* * * * * */5 30

Every five minutes and, in addition, at the 30th second in the specified minute

My code exeute the job every day at 00:00

This code enable to call 2 stores procedures per execution. Don't put the character ";" at the end of the call procedure.

Now we need to access to XS Engine with the URL http://<XSengine-host><XS-port>/sap/hana/xs/admin/

Here we need to activate it:

If you want to confirm when the XS Job will run, click on View Logs:

And check the Planned Time:

My system is on CEST with DST, for this reason the planned time is 2 hours after scheduled.

Enjoy it!

Juan de la Cruz Arellano Royo

Labels in this area