HANA - Job

Sap Hana Architecture

About

To schedule a job against HANA, you may choose:

  • your scheduler with the hdbsql command line
  • or the HANA solution with the XS application server.

Solution

Scheduler

Take your favorite scheduler and execute the following statement:

hdbsql -n host:port -u userName -p pwd "call myProcedure(myVariable)"

XS

XSJOBs can directly call a Stored Procedure as well as XSJS services created in an XS application.

  • Create the job file .xsjob that defines details of the recurring task (Text editor)
  • Maintain the corresponding runtime configuration for the xsjob (SAP HANA administrator XS Job Dashboard)
  • Enable the job-scheduling feature in SAP HANA XS (SAP HANA administrator XS Job Dashboard)
  • Check the job logs to ensure the job is running according to schedule (SAP HANA administrator XS Job Dashboard)

Enable

Enable the job scheduling feature in SAP HANA.

System -> xsengine.ini -> scheduler -> enabled.

XSJob

{
    "description": "Call my Sqlscript procedure",
    // Javascript
    "action": "<package_path>:<XSJS_Service>.xsjs::<FunctionName>"
    // Example: "action": "yahoo:yahoo.xsjs::readStock",
    // SqlScript
    "action": "<package_path>:SqlScriptName"
    // HANA Procedure (???)
    "action": "<package_path>:ProcedureName"
    // "action": "playground.sp7.procedures::jobsCreateEntry", 
    "schedules": [
       {
          "description": "Read current stock value",
          "xscron": "* * * * * * 59",
          "parameter": {
             "stock": "SAP.DE"
             }
       }
    ]
}

Documentation / Reference







Share this page:
Follow us:
Task Runner