Skip to Content
Technical Articles
Author's profile photo Carlos Roggan

Using Job Scheduler in SAP BTP [14]: FAQs

In this blog post, I’m listing some frequently answered questions (I’m skipping those frequently asked questions which I wasn’t able to answer).
There’s also an FAQ-page in the SAP Help Portal.
In case of issues – you might have already had a look at the “Troublemaking” Blog Post.

General

Q:
Creation of Jobscheduler instance fails in Dashboard
A:
Try using the Cloud Foundry Command Line Iterface (CLI)

Q:
In the Dashboard (menu “Events”) I can see a column called “actor”. Why does it have different values?
A:
In case of manual job creation it is the user.
In case or programmatic job generation (REST API, multitenant scenarios) it is the ClientID.

Q:
I’d like to execute one job per minute
A:
This is not supported (currently) by Jobscheduler
Q:
Is there a workaround?
A:
You can schedule multiple jobs for the same endpoint – in a sequence.
Schedule would be 1 minute later for each sequent job.

Q:
Does Jobscheduler store run logs? Are there backups?
A:
Scheduler execution RunLogs are stored during and after execution.
There are regular backups.

Q:
Whats the retention period for the backups?
A:
15 Days Runlogs and DB Backups

Q:
How can I set log level for @sap/xssec
A:
cf set-env mutete DEBUG xssec:*

Q:
Is there a way to configure a job to run depending on a second job?
A:
No, conditional triggers are (currently) not supported

Q:
Is there an integration of Alert Notification Service with Jobscheduler?
A:
Currently not.
As a workaround, you might consider:
– calling the Alert manually in your code
– polling your job from a second app

Q:
Kyma?
A: 
Not yet

Q:
My asnyc job or my CF Task are stopped (timeout)?
A: 
Default is 30 min.
In dashboard (Configurations), you can adjust the timeout setting.

CPI

Q:
We have an internal customer who wants to use Job Scheduler to invoke CPI iflows.
The CPI works in the provider account and exposes HTTP endpoints, which should be invoked by the Job Scheduler. Is it possible?
A:
If I understand the use case correctly, CPI would need to provide this functionality, as it exposes the HTTP endpoints.
Inside the HTTP endpoints, the jobscheduler token would need to be accepted and CPI would need to ensure on job creation that the user is allowed to execute these iFlows.

REST API

Q:
How to expose job creation API to customer of my multitenant app?
A:
It is necessary to have a wrapper API in the provider’s application. Then the customer can authenticate with the provider application and the provider application can forward job creation requests accordingly.
Giving the customer direct control over the jobscheduler rest API is not advised as they could then create a job to any url with any body, potentially introducing a security risk, e.g. if your app also handles tenant-independent jobs.

Q:
I’m using REST API, in the response of GET request there is a property “user” which is empty, although there’s a user-token being sent.
A:
This property is only relevant in service plan “lite”, in case of basic auth

Multitenancy

Q:
For my MT app, can I create tenant-aware jobs in the Dashboard?
A:
No, this is only possible via REST API, and with tenant-specific JWT token.

Q:
Can I try multitenancy with Jobscheduler in Trial account?
A:
No, Jobscheduler doesn’t support multitenancy in Trial

Q:
WRT Job generation, what is the difference between client-credentials and TokenExchange?
A:
Currently a user doesn’t see any difference.
Internally, there might be relevant changes (audit logging, tracking)
It is recommended to use TokenExchange anyways.

Q:
My MT app subscription doesn’t work.
What can I do?
A:
Make sure that Jobscheduler service was created with enableXsuaa=true
Try using SaaS REST API to check if the dependency has been properly registered
SAP Help Portal documentation for MT in CF: SaaS registry. and SaaS REST API

Q:
I have problems with Multitenancy
A:
In few cases, the following setting is required:
When calling the REST API you need to provide the JWT token as a Bearer token and (important) add a header ‘x-sap-scheduler-instance-id’ containing the jobscheduler instance id from your jobscheduler instance.

Q:
JWT token doesn’t contain the granted scope, so calling action endpoint fails.
App is MTA
A:
In you node app, try to define the grant like this:

properties:
      trusted-foreign-xsuaa-instances:
         - appId: jobscheduler
           clientId: sb-23a365c5-01ec-4d5f-b3b1-d8d00b88e1af!b252|sap-jobscheduler!b4

Assigned Tags

      5 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Weikun Liu
      Weikun Liu

      Hi Carlos,

       

      I think I have several questions would like to double check with you regarding the job scheduler

       

      Q1: Does the Job Scheduler support scheduling job to be triggered per minute ?
      Q2: Could you please kindly share with me some name from Job Scheduler product team so that I could check with them through email ?

       

      Best Regards,

      Weikun Liu

      Author's profile photo Carlos Roggan
      Carlos Roggan
      Blog Post Author

      Hi Weikun Liu ,

      please contact me via personal message to answer your queries.
      Kind Regards,
      Carlos

      Author's profile photo Anshuman Satapathy
      Anshuman Satapathy

      Hello Carlos Roggan

       

      Do you know any way how we can debug a service that the job is calling? The backend service is written in node js.

      Any input helps. Thank you.

      Regards,

      Anshuman

      Author's profile photo Carlos Roggan
      Carlos Roggan
      Blog Post Author

      Hello Anshuman Satapathy ,
      I had put the ideas I had for troubleshooting, into the troublemaking blog

      Regards,
      Carlos

      Author's profile photo Anshuman Satapathy
      Anshuman Satapathy

      Hello Carlos Roggan ,

      I had issues with the service as I said. I just put the service in a different exposed end point and used a router to call the service from local host. That way, I could test the internal calling as well.

      Thank you for the next blog. It will help me test end to end.

      Thanks,

      Anshuman