Skip to Content
0

Background job distribution on application servers

Feb 15, 2017 at 03:07 PM

242

avatar image
Former Member

Hi experts,

We have the following situation.

There is a system (A) with two application servers (A.1 and A.2) on which some background jobs (standard FPP framwork jobs) are started via an RFC call, from another system (B). We would like to restrict the target servers to a single one(either A.1 OR A.2). Is this possible?

The answers I found so far were about jobs scheduled manually in SM37.

Others suggested creating a job server group in SM61 ('SAP_DEFAULT_BTC') to which jobs, which don't have a target server, will be assigned.

However this is not a good solution since the jobs are created and started from the code at runtime.

Thank you,

Calin

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Best Answer
avatar image
Former Member Feb 17, 2017 at 08:42 AM
1

Thanks for your answer, my issue was solved by providing the optinal 'distribution' parameter to job's 'set_run_data' method, before staring the jobs' execution. This way, all the jobs were started only on the specified Application Servers.

Thank you,

Calin

Show 2 Share
10 |10000 characters needed characters left characters exceeded

Calin,

Do you know what EXECUTION TARGET field is used for in SM36 ? It even has Server names in F4 help.

Also kindly let us know where is this option DISTRIBUTION in SM36.

Thanks,

K.Kiran.

0
Former Member
Kiran K

Hi Kiran,

The "Execution Target" field in SM36 is used to define target Application Servers (AS) or Job Server Groups on which the jobs will be started.

Note that Job Server Groups are sets of application servers, which you can maintain in SM61 (Shift + F12).

Regards,

Calin

1
Alexander Bolloni
Feb 17, 2017 at 10:32 AM
1

Hi,

you should be able to achieve the same things for Jobs scheduled via ABAP API as compared to when you do it manually in SM36.

Jobs can have a target Server Group (defined in SM61) or Jobs can also have an explicit target Server. Using a Server Group is better because if a Server is down for example, another Server in the Group could take over.

What API are you using to create the Job?

Regards,

Alex

Show 1 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Hi Alex,

Thanks for your answer.

You are right; if I provide the server name to FPP's standard API *FPP_INTERACTION_RUNS->SET_RUN_DATA( ) method, the jobs are started only on the specified server.

I created a Job Server Group in SM61 and provided it to the method above. However, this approach does not work, for some reason. The job's status in SM37 is "Cancelled" and the error in the job log is "No work processes are available for 5 background job. No jobs can be started". Maybe the server group is not recognized? (although I do have access to the group in SM36). The work process limit is not the problem either, since I was able to start 5 or 10 jobs in a previous test.

Thanks,

Calin

0
Tong Ning Feb 17, 2017 at 05:44 AM
0

Try to maintain the target node in RFC setting and then trigger the background job, is it OK?

Share
10 |10000 characters needed characters left characters exceeded