Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Batch Job restrictions

Former Member
0 Kudos
1,213

Hello,

Is it possible to restrict some of the batch jobs to run only at specific period i.e. only day time or run between certain hours of the day.

As we are planning to create a Abap program which checks whether any job can run between specific time period...

Please suggest.

Regards,

JPS

9 REPLIES 9

Former Member
0 Kudos
371

u can schedule the prog to be run periodically[select the check box in start condtion].

u also can click '>>' button in start condition. it takes u to periodic execution tab.

give the reqd date time there...

Former Member
0 Kudos
371

Try to use some options in tcode SM36 - Button START CONDITIONS. - in Toolbar

THere you have many options available to set the timings.

regards,

Padma

0 Kudos
371

Hi,

In SM37, in the release condition under the Date/ Time, we have Period values and restrictions.

You can try that one.

0 Kudos
371

Thanks all,

But my issue is that whether I can restrict a job and want it to run between a specific time period e.g. 10.00 AM to 15:00 PM only....

regards,

JPS

0 Kudos
371

As already said, inside the Start Condition button, you have DATE/TIME button, inside that give the schedule start time.

regards,

Padma

0 Kudos
371

Yeah you can restrict a job and run between a specific time period.

Give the schedule start date and time in "Scheduled start" of Date/Time and Under "No start after " you can give the date and time, so that it wont execute after that.

0 Kudos
371

Hi,

What you need is not provided as a feature in SAP. Even No start After will not help. As it will automatically create a new time window and keep running.

1. One is to user external tools available.

2. Is to write an ABAP Program.

You can refer to this thread. Let me know if more is required.

0 Kudos
371

Yes. This can be done throught the transaction SM36. You can give the time at which the job has to run.

It is of your choice. First of all explore the transaction SM36.

If you are not able to do that, then use softwares like REDWOOD or TIVOLI to achieve this.

Thanks,

Babu Kilari

Former Member
0 Kudos
371

Hi,

1. Go to SM36 give the job name i.e. ZABC_MYJOB

2. Click on Steps (Upper left corner - 2nd Button) and assign the ABAP report name .i.e. RSUSR002, Check and Save.

3. Click on Start Condition (Upper left corner - Ist Button), click Date/Time and specify the Start Date and Time.

4. Select "Periodic Job" and click on Period values now click on Other Period

5. Now input 1 in the Minute Box. , and check and save.

6. Again Check and Save. and Again Check and Save.

7. Now save the job.

This job will run after every 1 minut

(OR) try the below steps.

you can setup your job in order to start after an event.

After that you can get the event triggered from the Operating System:

- log into you Operating System with the SIDadm user id (at the Operating System level) and go to directory /usr/sap/SID/SYS/exe/run

- Run the SAPEVT executable as follows :

sapevt YOUR_EVENT -t pf=/usr/sap/SID/SYS/profile/DEV_DVEBMGS00_server001 nr=01

This will raise the event, and cause the job scheduled within SAP to execute.

In this way you can use the O.S. (u201Ccrontabu201D for example) functionalities in order to schedule your job between 9am to 6pm.

Regards

Pugal