cancel
Showing results for 
Search instead for 
Did you mean: 

Force the execution in background in an specific server

Former Member
0 Kudos

Hi

There are several Z programs that must be processed in background (not using SM36, but using Program -> Execute in Background F9).

The request is that this programs run at a specif server (in our case, central instance).

I realized that when the job is created using SM36 it is possible to indicate the server, but in the situation described above, there is no option to indicate the server.

I would like to know if there is a BADI, EXIT, .... where I can indicate the central instance, or any other way to solve this problem.

Please advise.

Thanks in advance.

Gaia

Edited by: DENISE RIBEIRO GAIA on Jul 15, 2011 3:28 PM

Accepted Solutions (0)

Answers (2)

Answers (2)

xymanuel
Active Participant
0 Kudos

Hi Denise,

if i understand you correct, your goal is, that none schedule backgroundjobs on the central instance.

For this to achieve just do the following.

1. Go to sm61

2. Create an Job-Servergroup exactly namend "SAP_DEFAULT_BTC".

3. Add your appservers to this group, except the central instance.

If now anyone plans a backgroundjob without explicitly selecting your central instance as the backgroundserver (exec. target),the backgroundjob will start on one of the appservers of your default_btc group.

The good thing is, the "SAP_DEFAULT_BTC" group will always be selected for jobs which have no exec target (empty field)

If you really want, that no one can start BG Jobs on your CI, you have to do this with authorization object S_BTCH_JOB, field JOBGROUP.

Add a jobgroup in sm61 e.g. "PRODUCTIVEJOBGROUP" with only Appservers in this group.

Distribute the S_BTCH_JOB authobject only with JOBGROUP = PRODUCTIVEJOBGROUP and ' ' to your users.

So noone will be able to schedule jobs to other groups than the "SAP_DEFAULT_BTC" and the "PRODUCTIVEJOBGROUP".

Kind Regards

Manuel

Former Member
0 Kudos

Hi gurus , but in your opinion, this solution works even if more jobs are concatenated. Or is there an easier way to schedule jobs on the same server for example 3 job in chain.

Thanks a lot.

Albert.

Former Member
0 Kudos

Hi,

If your program is executed from SE38 + F9, just tell the user to connect on the CI server before lauching the program.

You could even force him with a logon group containing only the CI server.

It is of course possible to do programmatically but it would not be pretty : detect on which server the program runs, if not on the CI server create a job (sceduled immediately) on the CI server...

The best solution, IMHO, is to review the request...

Regards,

Olivier

Former Member
0 Kudos

Hi Olivier

Thank you for your response, but I would like to make the following considerations:

a) when I use SE38+F9 there is no option to entry the server;

b) in this request, what determines if the program should or shouldn't run at the Central Instance it is the program and not the user.

Just to clarify: this request is due to a change in our environment. We have several programs that generate files at Unix directories. After "this change in our environment", only the programs that run at Central Instance will be able to generate files at the Unix directories.

Regards

Gaia

Former Member
0 Kudos

Denise,

Create a background server group in SM61 and ask your developer to make the job to run on that particular server group through the code or else you can always select the background server group while releasing the job.

In SM61 you can add the app server which should be part of that background processing.

Regards

Vivek