DevOps and System Administration Discussions
Dive into SAP DevOps and system administration. Join discussions to collaborate on optimizing workflows, share knowledge, and leverage resources effectively.
cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to schedule a background which runs only from Monday to Friday and 7am to 7pm?

0 Kudos

Hello All ,

We need to schedule a background job where it should run only from Monday to Friday ,7 AM to 7 PM . How can we achieve this ?

Kindly suggest .

Thanks ,

Naresh

2 REPLIES 2

venkateswaran_k
Active Contributor
0 Kudos

Dear Varada

You have options as below.

Option 1

You write one wrapper program - that checks the date for day (Monday-Friday). if it is not true then submit your actual program else skip. - Use that wrapper program as a job at SM36.

You can use FM DATA_TO_DAY to get the name of day by passing sy-datum.

Option 2

Another way is to maintain a custom factory calendar where highlight the day it should be run and rest all days are maintained as holiday. Transport such a calendar to the production system .

Then in SM36 , while scheduling jobs step

go to the Restrictions tab. In this select the calendar which is customized according to your requirement.Then select the option "Do Not Execute Job on Sundays or Holidays".

Quicker option will be first one..

Regards,

Venkat

0 Kudos

Hi Venkat ,

Thanks for your response ,

As per 2 option we can schedule job from Monday to Friday but how can we restrict job to be run between 7 AM to 7 PM .

Regards ,

Naresh