Initial commit
This commit is contained in:
76
templates/job-creation.json
Normal file
76
templates/job-creation.json
Normal file
@@ -0,0 +1,76 @@
|
||||
{
|
||||
"_comment": "SAP BTP Job Scheduling Service - Job Creation Template",
|
||||
"_documentation": "https://help.sap.com/docs/job-scheduling/sap-job-scheduling-service/create-job",
|
||||
"_instructions": [
|
||||
"1. Replace all [PLACEHOLDER] values with your actual values",
|
||||
"2. Remove _comment, _documentation, _instructions fields before submitting",
|
||||
"3. Choose ONE scheduling mode per schedule: cron, time, repeatInterval, or repeatAt",
|
||||
"4. Use HTTPS for action endpoints in production",
|
||||
"5. All times are interpreted as UTC"
|
||||
],
|
||||
|
||||
"name": "[JOB_NAME]",
|
||||
"description": "[JOB_DESCRIPTION]",
|
||||
"action": "https://[YOUR_APP].[LANDSCAPE].hana.ondemand.com/api/[ENDPOINT]",
|
||||
"active": true,
|
||||
"httpMethod": "POST",
|
||||
|
||||
"startTime": {
|
||||
"date": "[YYYY-MM-DD]",
|
||||
"format": "YYYY-MM-DD"
|
||||
},
|
||||
|
||||
"endTime": null,
|
||||
|
||||
"schedules": [
|
||||
{
|
||||
"_comment_schedule_type": "OPTION 1: Recurring with cron (7-field SAP format)",
|
||||
"_cron_format": "SAP format: [Year] [Month] [Day] [DayOfWeek] [Hour] [Minute] [Second]",
|
||||
"active": true,
|
||||
"description": "[SCHEDULE_DESCRIPTION]",
|
||||
"cron": "* * * * [HOUR] [MINUTE] [SECOND]",
|
||||
"startTime": {
|
||||
"date": "[YYYY-MM-DD]",
|
||||
"format": "YYYY-MM-DD"
|
||||
},
|
||||
"data": {
|
||||
"_comment": "Custom payload sent to action endpoint",
|
||||
"param1": "value1"
|
||||
}
|
||||
}
|
||||
],
|
||||
|
||||
"_alternative_schedule_types": {
|
||||
"one_time": {
|
||||
"time": "now",
|
||||
"_or": "2025-12-31T23:59:59Z",
|
||||
"_or_human": "tomorrow at 4pm"
|
||||
},
|
||||
"repeat_interval": {
|
||||
"repeatInterval": "2 hours",
|
||||
"_examples": ["5 minutes", "1 day", "2 weeks"]
|
||||
},
|
||||
"repeat_at": {
|
||||
"repeatAt": "6.00am",
|
||||
"_examples": ["4.40pm", "18:30", "6.20am"]
|
||||
},
|
||||
"cron_examples": {
|
||||
"daily_9am": "* * * * 9 0 0",
|
||||
"every_monday_10am": "* * * mon 10 0 0",
|
||||
"last_sunday_monthly": "* * * -1.sun 9 0 0",
|
||||
"every_30_min_10_to_12": "* * * * 10:12 0,30 0",
|
||||
"first_of_month_6pm": "* * 1 * 18 0 0"
|
||||
}
|
||||
},
|
||||
|
||||
"ansConfig": {
|
||||
"_comment": "SAP Alert Notification Service (Cloud Foundry only)",
|
||||
"onSuccess": false,
|
||||
"onError": true
|
||||
},
|
||||
|
||||
"calmConfig": {
|
||||
"_comment": "SAP Cloud ALM monitoring",
|
||||
"enabled": true
|
||||
}
|
||||
}
|
||||
66
templates/xs-security.json
Normal file
66
templates/xs-security.json
Normal file
@@ -0,0 +1,66 @@
|
||||
{
|
||||
"_comment": "SAP XSUAA Configuration Template for Job Scheduling Service",
|
||||
"_documentation": "https://help.sap.com/docs/job-scheduling/sap-job-scheduling-service/define-and-grant-scopes-to-sap-job-scheduling-service",
|
||||
"_instructions": [
|
||||
"1. Replace [APP_NAME] with your application name",
|
||||
"2. Replace [JOBSCHEDULER_INSTANCE] with your Job Scheduling service instance name",
|
||||
"3. Remove all _comment and _instructions fields before deployment",
|
||||
"4. Create/update XSUAA: cf create-service xsuaa application my-xsuaa -c xs-security.json",
|
||||
"5. Bind to app: cf bind-service my-app my-xsuaa && cf restage my-app"
|
||||
],
|
||||
|
||||
"xsappname": "[APP_NAME]",
|
||||
"tenant-mode": "dedicated",
|
||||
|
||||
"scopes": [
|
||||
{
|
||||
"name": "$XSAPPNAME.JOBSCHEDULER",
|
||||
"description": "Job Scheduler Scope - Allows Job Scheduling service to invoke action endpoints",
|
||||
"grant-as-authority-to-apps": [
|
||||
"$XSSERVICENAME([JOBSCHEDULER_INSTANCE])"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
||||
"authorities": [
|
||||
"$XSAPPNAME.JOBSCHEDULER"
|
||||
],
|
||||
|
||||
"_additional_scopes_example": {
|
||||
"_comment": "Add more scopes if your app needs different permission levels",
|
||||
"scopes": [
|
||||
{
|
||||
"name": "$XSAPPNAME.JobRead",
|
||||
"description": "Read job data",
|
||||
"grant-as-authority-to-apps": ["$XSSERVICENAME([JOBSCHEDULER_INSTANCE])"]
|
||||
},
|
||||
{
|
||||
"name": "$XSAPPNAME.JobWrite",
|
||||
"description": "Write job data",
|
||||
"grant-as-authority-to-apps": ["$XSSERVICENAME([JOBSCHEDULER_INSTANCE])"]
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
"_multitenant_example": {
|
||||
"_comment": "For multitenant applications",
|
||||
"tenant-mode": "shared",
|
||||
"scopes": [
|
||||
{
|
||||
"name": "$XSAPPNAME.JOBSCHEDULER",
|
||||
"description": "Job Scheduler Scope",
|
||||
"grant-as-authority-to-apps": ["$XSSERVICENAME([JOBSCHEDULER_INSTANCE])"]
|
||||
},
|
||||
{
|
||||
"name": "$XSAPPNAME.Callback",
|
||||
"description": "Tenant callback scope",
|
||||
"grant-as-authority-to-apps": ["sap-provisioning"]
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
"_variable_reference": {
|
||||
"$XSAPPNAME": "Resolves to the value of xsappname field",
|
||||
"$XSSERVICENAME(name)": "Resolves to the service instance identifier"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user