on 04-07-2014 6:15 PM
Hi,
I would like to log the job id of each scheduled job execution for correlation/troubleshooting purposes. Do xsjob scheduled jobs have any id that can be retrieved from a HANA project (e.g. xsjs file)? If not is there any mechanism for setting/getting a job ID?
Thanks,
Diego
Yes every job instances has a job ID. When you add a new Job via the XSJS API, you receive this job id:
http://help.sap.com/hana/SAP_HANA_XS_JavaScript_Reference_en/$.jobs.JobSchedules.html
If you create it manually in the XSAdmin tool, you don't see the Job ID in the UI. However the Job ID can be read from the table "_SYS_XS"."JOB_SCHEDULES".
I think though that you are asking if you can read the Job ID from within the logic being executed by the JOB? Is that correct? If so there is no public API where you could do that. I suppose you could read it from the above mentioned table by hard coding the Job Name in the query.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
10 | |
9 | |
9 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.