SAP: BTP Job Scheduling Service

SAP: BTP Job Scheduling Service


Disclaimer

Your use of this download is governed by Stonebranch’s Terms of Use.

Version Information

Template NameExtension NameExtension Version

SAP BTP Job Scheduling Service

ue-sap-btp-jss

1 (Current 1.0.0)


Refer to Changelog for version history information.

Overview

The SAP Business Technology Platform (BTP) Job Scheduling Service delivers a streamlined, runtime-agnostic mechanism for orchestrating one-time or recurring jobs, whether triggering REST endpoints or launching Cloud Foundry tasks. It supports cron and human-readable formats, OAuth 2.0‑secure multitenant execution, and can be managed via a web dashboard for automating business processes in Cloud Foundry environments.

This integration builds on SAP BTP’s scheduler by offering a simplified interface for job creation, deployment, and lifecycle management. Users can schedule and trigger job runs immediately, retrieve information relating to the run progress in real time, and choose from flexible output options. Completed job schedules may be automatically deleted based on the run’s outcome, reducing manual cleanup.

Key Features

Feature

Description

Immediate Job Scheduling and Execution

Trigger jobs instantly by creating schedules set to run immediately.

Real-Time Job Monitoring

Monitor the progress of running jobs in real time, with access to events and changes made via STDOUT.

Access to Logs and Execution Details

Retrieve logs and execution details during or after job execution. Logs are available via STDOUT or the extension output interface.

Post-Execution Job Cleanup

Automatically delete jobs after completion based on their execution status.

Requirements

This integration requires a Universal Agent and a Python runtime to execute the Universal Task.

Area

Details

Python Version

Requires Python 3.11. Tested with Agent bundled python distribution

Universal Agent Compatibility

  • Compatible with Universal Agent for Windows x64 and version >= 7.6.0.0.

  • Compatible with Universal Agent for Linux and version >= 7.6.0.0.

Universal Controller Compatibility

Universal Controller Version >= 7.6.0.0.

Network and Connectivity

Connectivity towards SAP Job Scheduling Service

Supported Actions

There is one Top-Level action controlled by the Action Field:

  • Schedule & Run Job

Monitoring capabilities, as well as capabilities for retrieval of information relating to the job being executed are provided. 

Action Output


Description

Examples

EXTENSION

The extension output provides the following information:

  • exit_code, status_description: General info regarding the task execution. For more information users can refer to the exit code table.

  • invocation.fields: The task configuration used for this task execution.

  • result.job_run_logs: Logs that may have been produced from the task or job being executed.

  • result.job_run_info: Information relating to current job or task execution.


Successful Execution, with all Extension Output options enabled
{
	"exit_code": 0,
	"status_description": "Job scheduled and executed successfully",
	"invocation": {
		"extension": "ue-sap-btp-jss",
		"version": "1.0.0",
		"fields": { ... }
	},
	"result": {
		"job_run_logs": "[2025-07-23 08:47:57] This message was printed to STDOUT by executed task",
		"job_run_info": {
			"runId": "c29faef3-2c94-4e6a-ab34-2543f9f6937e",
			"httpStatus": 202,
			"executionTimestamp": "2025-07-23 08:47:09",
			"runStatus": "COMPLETED",
			"runState": "SUCCESS",
			"statusMessage": "The endpoint has successfully executed the job",
			"scheduleTimestamp": "2025-07-23 08:47:09",
			"completionTimestamp": "2025-07-23 08:48:17"
		}
	}
}
Failed Execution
{
	"exit_code": 1,
	"status_description": "Execution Failed: The job 'failing_job(12345)' has ended in failure.",
	"invocation": {
	"extension": "ue-sap-btp-jss",
	"version": "1.0.0",
	"fields": { ... }
	},
	"result": {
		"job_run_logs": null,
		"job_run_info": {
			"runId": "fd61f232-8f95-4527-be2e-7f9b67db9e6d",
			"httpStatus": 404,
			"executionTimestamp": "2025-07-23 09:18:01",
			"runStatus": "COMPLETED",
			"runState": "REQUEST_ERROR",
			"statusMessage": "Error encountered while sending job execution request to the endpoint",
			"scheduleTimestamp": "2025-07-23 09:18:01",
			"completionTimestamp": "2025-07-23 09:18:01"
		}
	}
}

STDOUT

The STDOUT output produced during the execution of the task instance.

Output can be controlled via the STDOUT Options input field. Available choices are

  • “Enable Job Run Monitoring”, which streams information about the state of the job currently being executed.

  • “Include Job Run Logs” which outputs any logs that may be produced by the job or task being executed.

Both options are only applicable if Wait for Success or Failure has been selected.

Successful Execution, with all STDOUT options enabled
--- Job Run Monitoring Events ---
Event Received:
	Timestamp: 2025-07-23 08:47:09
	Type: SCHEDULED
	Message: Next run at 2025-07-23 08:47:09 (UTC)
	Code: None


Event Received:
	Timestamp: 2025-07-23 08:47:09
	Type: TRIGGERED
	Message: 
	Code: None


Event Received:
	Timestamp: 2025-07-23 08:47:09
	Type: ACK_RECVD
	Message: CF task created with state RUNNING
	Code: 202


Event Received:
	Timestamp: 2025-07-23 08:48:17
	Type: SUCCESS
	Message: Logs: Exit status 0, Task finished successfully.
	Code: 200


--- Executed Job Logs ---
[2025-07-23 08:47:57] This message was printed to STDOUT by executed task
[2025-07-23 08:48:57] This is another message printed by the task
[2025-07-23 08:49:57] Yet another message printed by the task

Configuration Examples

Example: Schedule a Job for Immediate Execution

This configuration specifies an Authentication URL and an API URL. After selecting a specific job or task through the relevant dynamic choice field, it is scheduled for immediate execution, and the task returns immediately after verifying execution has been triggered.

Example: Schedule a Job for Immediate Execution and wait for its completion

This configuration specifies an Authentication URL and an API URL. After selecting a specific job or task through the relevant dynamic choice field, it IS scheduled for immediate execution, with the task waiting for its completion. Upon completion, all output options have been selected and will be displayed to the appropriate output streams. Job Run Logs are to be included only if produced by the executed job or task. Upon completion, the created schedule will be deleted if the run is successful.

Importable Configuration Examples

This integration provides importable configuration examples along with their dependencies, grouped as Use Cases to better describe end to end capabilities.

Those examples aid in allowing task authors to get more familiar with the configuration of tasks and related Use Cases. Such tasks should be imported in a Test system and should not be used directly in production.

Initial Preparation Steps

    • STEP 1: Go to Stonebranch Integration Hub and download the "SAP: BTP Job Scheduling Service" integration. Extract the downloaded archive on a directory in a local drive.

    • STEP 2: Locate and import the above integration to the target Universal Controller. For more information refer to the "How To" section in this document

    • STEP 3: For "SAP: BTP Job Scheduling Service", inside directory named "configuration_examples" you will find a list of definition zip files. Upload them one by one respecting the order presented below, by using the "Upload" functionality of Universal Controller: 

      • variables.zip

      • credentials.zip

      • scripts.zip

      • tasks.zip

      • workflows.zip

    • STEP 4: Update the uploaded UAC Credential entity introduced with proper Username / Password

    • STEP 5: Update the UAC global variables introduced with variables.zip file. Their name is prefixed with "ue_sap_btp_jss". Review the descriptions of the variables as they include information on how they should be populated.

The order indicated above ensures that the dependencies of the imported entities need to be uploaded first. 

How to "Upload" Definition Files to a Universal Controller

The "Upload" functionality of Universal Controller allows Users to import definitions exported with the "Download" functionality.

Login to Universal Controller and:

  • STEP 1: Click on "Tasks"  "All Tasks"

  • STEP 2: Right click on the top of the column named "Name"

  • STEP 3: Click "Upload..."

In the pop-up "Upload..." dialogue:

  • STEP 1: Click "Choose File".

  • STEP 2: Select the appropriate zip definition file and click "Upload".

  • STEP 3: Observe the Console for possible errors.

Use Case 1: SAP BTP JSS - Job Scheduling & Execution and Email Notification.

Description

In this Use Case, the workflow demonstrates how to schedule and execute a job using SAP BTP Job Scheduling Service (JSS) and send an email notification based on the job's outcome (success or failure).

The tasks configured demonstrate the following capabilities among others:

  • Scheduling and executing a job in SAP BTP Job Scheduling Service.

  • Monitoring the job execution status.

  • Sending an appropriate email notification upon job completion (success or failure).

The components of the solution are described below:

  • "UC1: SAP BTP JSS - Schedule Job for Execution" – Schedules and executes a job in SAP BTP JSS.

  • "UC1: SAP BTP JSS - Send Email for Success" – Sends a success notification email if the job completes successfully.

  • "UC1: SAP BTP JSS - Send Email for Failure" – Sends a failure notification email if the job fails.


How to Run

Execution Steps:

STEP 1: Manually start the workflow. This triggers the first task, "UC1: SAP BTP JSS - Schedule Job for Execution", which schedules and runs a job in SAP BTP JSS.

STEP 2: The workflow monitors the job status.

  • If the job completes successfully, the second task, "UC1: SAP BTP JSS - Send Email for Success", sends a success email to the configured recipients.

  • If the job fails, the alternative task, "UC1: SAP BTP JSS - Send Email for Failure", sends a failure email notification.


Expected Results:

  • The job is successfully scheduled and executed in SAP BTP JSS.

  • A success email is sent if the job completes successfully.

  • A failure email is sent if the job fails, including relevant error details.

Input Fields


Name

Type

Description

Version Information

Action

Choice

The action performed upon the task execution.

  • Schedule & Run Job

Introduced in 1.0.0

SAP Credentials

Credentials

Credentials for authenticating with SAP BTP. The Credentials definition should be as follows.

  • Client ID as "Runtime User".

  • Client Secret as "Runtime Password".

Introduced in 1.0.0

Authentication URL

Choice

The URL used for retrieving an OAuth 2.0 Token.

Introduced in 1.0.0

Job Scheduler API URL


Credentials

The URL used for interacting with the SAP BTP Job Scheduling Service.

Introduced in 1.0.0

Job Name

Dynamic Choice

Name and ID of the job to be scheduled for execution. If manually inserting a value, only the job ID is required. If both are provided, a '|' should be used for separating them.

Introduced in 1.0.0

Wait For Success or Failure


Checkbox

Choose where the UAC task should wait until the started Job run is completed.

Introduced in 1.0.0

Polling Interval (sec)

Int

The number of seconds to wait when checking the job run’s status.

Defaults to 60 seconds.

Required when Wait For Success or Failure is checked.

Introduced in 1.0.0.

Max Number of Polls

Int

Maximum number of polls.

If left empty or set to 0, the task will poll indefinitely.

Required when Wait For Success or Failure is checked.

Introduced in 1.0.0.

Extension Output Options

Choice

Controls whether additional information is printed to Extension Output. Available options are:

  • Include Job Run Information

  • Include Job Run Logs (Only applicable if Wait For Success or Failure is selected)

Introduced in 1.0.0.

STDOUT Options

Choice

Controls whether additional information is printed to Standard Output. Available options are:

  • Enable Job Run Monitoring

  • Include Job Run Logs

Job Run Logs will be appended only if available.

Only available if Wait For Success or Failure is selected.

Introduced in 1.0.0.

Schedule Deletion Options

Choice

Specifies the conditions under which the Schedule that is created and contains the Job’s run should be deleted. Available options are:

  • Do not Delete Schedule (default)

  • Delete Schedule on Successful execution

  • Delete Schedule regardless of execution status

Only available if Wait for Success or Failure is selected.

Introduced in 1.0.0.

Output Fields

The following output-only fields provide better visibility during the execution of Universal Task Instances.

Name

Type

Description

Version Information

Job Name

Text

Name of Job scheduled for execution.

Introduced in 1.0.0.

Job IDText

ID of Job scheduled for execution.

Introduced in 1.0.0.

Schedule ID

Text

ID assigned to created schedule.

Introduced in 1.0.0.

Run ID

Text

ID assigned to run inside of schedule.

Introduced in 1.0.0.

Job Status

Text

Current Status of the Job run being executed.

Introduced in 1.0.0.

Last Updated On

Timestamp

Timestamp of latest update to Job Status.

Introduced in 1.0.0.

Environment Variables

Environment Variables can be set from the Environment Variables task definition table. The following environment variables can affect the behavior of the extension.

Environment Variable Name

Description

Version Information

UE_HTTP_TIMEOUT

Specifies the timeout (in seconds) for HTTP requests made by the Task Instance. A higher value allows for slower responses, while a lower value enforces stricter time constraints. When a timeout happens, the Task Instance ends in failure.

If not set, a default of 60 seconds is used.

Introduced in 1.0.0.

UE_SCHEDULE_POLL_INTERVAL

Polling interval when waiting for created schedule to begin execution.

If not set, a default of 1 second is used.

Introduced in 1.0.0.

UE_SCHEDULE_MAX_POLLS

Maximum number of polls when waiting for created schedule to begin execution.

If not set, a default of 30 polls is used.

Introduced in 1.0.0.

Cancelation and Rerun

In case of Cancelation, the currently running schedule is not deleted or altered in any way. Instead, only monitoring capabilities are stopped.

In case of Rerun, a completely new schedule is created, and the job is run inside of it.


Exit Codes

Exit Code

Status

Status Description

 Meaning

0

Success

“SUCCESS: Task executed successfully.“

Successful Execution

1

Failure

“Execution Failed: <<Error Description>>”

Generic Error. Raised when not falling into the other Error Codes.

2

Failure

“Authentication Error: Account cannot be authenticated.“

Bad credentials

3

Failure

“Authorization Error: Account is not authorized to perform the requested action.“

Insufficient permissions

20

Failure

“Data Validation Error: <<Error Description>>“



Input fields validation error.

40

Failure

“Polling Timeout: maximum poling timeout reached.“

Maximum number of polls has been reached


STDOUT and STDERR

STDOUT is used for displaying Job information and its controlled by STDOUT Options field.

STDERR provides additional information to the user, the detail of it is tuned by Log Level Task Definition field.

Backwards compatibility is not guaranteed for the content of STDOUT/STDERR and can be changed in future versions without notice


How To

Import Universal Template


To use the Universal Template, you first must perform the following steps

  1. This Universal Task requires the Resolvable Credentials feature. Check that the Resolvable Credentials Permitted system property has been set to true.

  2. Import the Universal Template into your Controller:

    1. Extract the zip file, you downloaded from the Integration Hub.

    2. In the Controller UI, select Services > Import Integration Template option.

    3. Browse to the “export” folder under the extracted files for the ZIP file (Name of the file will be unv_tmplt_*.zip) and click Import.

    4. When the file is imported successfully, refresh the Universal Templates list; the Universal Template will appear on the list.

Modifications of this integration, applied by users or customers, before or after import, might affect the supportability of this integration. For more information refer to Integration Modifications.


Configure Universal Task

For a new Universal Task, create a new task, and enter the required input fields.


Integration Modifications

Modifications applied by users or customers, before or after import, might affect the supportability of this integration. The following modifications are discouraged to retain the support level as applied for this integration.

  • Python code modifications should not be done.

  • Template Modifications

    • General Section

      • "Name", "Extension", "Variable Prefix", and "Icon" should not be changed.

    • Universal Template Details Section

      • "Template Type", "Agent Type", "Send Extension Variables", and "Always Cancel on Force Finish" should not be changed.

    • Result Processing Defaults Section

      • Success and Failure Exit codes should not be changed.

      • Success and Failure Output processing should not be changed.

    • Fields Restriction Section
      The setup of the template does not impose any restrictions. However, concerning the "Exit Code Processing Fields" section.

      1. Success/Failure exit codes need to be respected.

      2. In principle, as STDERR and STDOUT outputs can change in follow-up releases of this integration, they should not be considered as a reliable source for determining the success or failure of a task.

Event Template configuration related to “Metric Label Attributes” & “Optional Metric Labels” is allowed. However, administrators should be cautious of high cardinality scenarios that might occur.

Users and customers are encouraged to report defects, or feature requests at Stonebranch Support Desk.

Document References

This document references the following links:

Document Link

Description

Universal Templates

User documentation for creating, working with and understanding Universal Templates and Integrations.

Universal Tasks

User documentation for creating Universal Tasks in the Universal Controller user interface.

Changelog

ue-sap-btp-jss-1.0.0 (2025-09-04)

Initial Version