on 2024 May 29 1:18 AM
I have a JAVA application running in BTP.
I would like to create a schedule to run this application every 24 hours and am trying to use the 'Job Scheduling Service' for the same.
I do not want to create a 'Job' for the same, as that would require having the application running 24x7 with a rest endpoint exposed, but that will consume too much memory. Instead, I want to be able to start the app once every 24 hours and am trying to create a 'Task' in the Job Scheduling Service Dashboard to do the same.
I can't seem to figure out the supported 'Action' values for these. I want to write an action to start the corresponding application. Any help on the same would be greatly appreciated!
Request clarification before answering.
A cf task is pretty much any CLI command you want to send to the container of the app. But you will be constrained to the installed CLI commands in the container of what is possible.
For a NodeJs application I could run "npm start" to start my application or "node -v" to get version info, Java has similar commands. These commands would be the value for your 'action'.
To test which cli commands are understood in your container (before configuring the task) you could run the below in your terminal and check in the logs of the deployed app what the output/error is:
cf run-task MYAPP --command "echo 12345"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 7 | |
| 6 | |
| 6 | |
| 4 | |
| 4 | |
| 4 | |
| 3 | |
| 3 | |
| 3 | |
| 3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.