Skip to Content
avatar image
Former Member

Background job distribution on application servers

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

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

    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

    Add comment
    10|10000 characters needed characters exceeded

    • 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

  • Feb 17, 2017 at 10:32 AM

    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

    Add comment
    10|10000 characters needed 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

  • Feb 17, 2017 at 05:44 AM

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

    Add comment
    10|10000 characters needed characters exceeded