Skip to Content
avatar image
Former Member

XSA Where i'am must using Job Scheduler HTTP REST APIs

Hello experts !

I'am have using xs advance. I'am need start the tasks.

After i binding my app to the Service instance i go to the Job Scheduler Dashboard. I see only Open Dashboard to the my app.

When i open this screen i see Configutations and jobs.

Where i must using REST APIs to manage the schedule ?

If i'am must wright code node.js then where should I do this ?

1snapshots.png (16.1 kB)
2snapshot.png (19.3 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Feb 19 at 12:18 PM

    There's now a comprehensive introduction to using the job scheduler in XS Advanced from the SAP HANA Academy. Hopefully it will clear up any confusion. See the following blog: https://blogs.sap.com/2018/02/19/using-the-job-scheduler-in-xs-advanced/

    Regards,

    Philip

    Add comment
    10|10000 characters needed characters exceeded

  • Mar 24, 2017 at 10:26 AM

    Is your requirement to schedule your jobs using the REST API or is this just a workaround, because you didn't find an option to maintain the schedule in the Job Scheduler Dashboard?

    In case you wanna maintain it in the Dashboard, please check if you have the required Job Scheduler Administration role assigned (Roles for Running the Job Scheduler. It doesn't seem so.

    If your requirement to use the REST API, in Node.js, according to your statements you have two options:
    - In an XS Advanced Node.js application you can use the sap-jobs-client package which provides a library which encapsulates the REST API calls for you.

    - If you are working on a Non XS Advanced Node.js application in which you have to to the Job Scheduler REST API calls by yourself, using one of the available npm packages which supports you to make requests in a convenient way (examples: request or request-promise, ...).

    Regards,
    Florian

    Add comment
    10|10000 characters needed characters exceeded

    • I am running the Job Dashboard on HANA 1 SPS12 and there does not seem to be a button present to initially create a job. But once you created one via API, there will be an edit button available in the footer, allowing you to edit every bit of information. It seems, the missing add button is some kind of bug. Hopefully this has already been fixed in HANA2.

      One additional side note:

      The documentation on SPS12 sadly is inconsistent about the repeatInterval parameter, which is sometimes replaced with repeatEvery. But the latter one does not work! Took me some time to figure this out.

      A correct job would look like this:

      var myJob = {
      	name: "Fetch data",
      	action: "https://vhcalhxedb:51007/fetch/dummy",
      	description: "Do some stuff",
      	active: true,
      	httpMethod: "GET",
      	signatureVersion: 1,
      	schedules: [{
      		repeatInterval: "5 seconds",
      		active: true,
      		description: "Fetch every 5 seconds"
      	}]
      };