2020 Apr 14 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
2020 Apr 14 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
2020 Apr 17 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
2024 Oct 15 3:28 PM
If your job only has one program with one variant, them you are good - just set up the job using BTCAUX10.
Maintain the jobname, program name and variant name and the time restrictions in it.
If your job consists of multiple steps with different programs and program names - then you are really out of luck. Job scheduling options are quite poor with SAP and hence the dependency on external tools.