04-14-2020 1:24 AM
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
04-14-2020 6:04 AM
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
04-17-2020 2:29 AM
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