Scheduling a background job using factory calendar

By Savitha Madhavagiri, CSC India

Consider a batch job that needs to be run on every 3rd Saturday in a month.

If you set it up using transaction SM36 as a repetitive batch job you see that the options provided do not match this requirement.

We can achieve this by creating a factory calendar then using the factory calendar option in SM36.

Let us see below how we configure these settings.

Configuration:

Create a new factory calendar that has one working day which is always the 3rd Saturday of the month.

You use transaction SCAL to create factory calendars. Select the Factory calendar radio button and then click on the change icon.

In the next screen enter the calendar ID, its description, and the years for which it is valid.

As we are going to use Special rules only, we don’t need to enter a holiday calendar or define workdays on this screen. Press Save and then click on “Special rules”.

In the next screen that appears enter the specific dates for which you want the calendar to be active. Tick the Workday check box for these dates.

Press save and go back to Overview screen. Click on the Calendar button to see what these dates look like in a calendar format.

 

Double-click on a year to see the work dates in a calendar format. Workdays are highlighted in yellow on your screen and non-working days are in green. In our example we have set dates only for 3 months, so you see no of workdays as 3 for year 2009.

 

By following the above steps we have set up a new factory calendar Z4.  

Job scheduling in SM36:

Create a new job ZTEST and click on “Start condition”.  Press  “Date/Time” and tick the Periodic  job check box.  Click on the Monthly button and press Save.

Then click on “Restrictions” button. In the pop-up of Start date restrictions enter calendar id as Z4 and select Move job to next working day option which restricts the job.  

 

Then press transfer to save the settings and go back to pop-up.  

Press ok and return to main screen of SM36.

We can see the job planned start date is set to 15.08.2009(3rd Saturday in August) and frequency is set to Monthly. Define the steps and complete the job set up by pressing save.

Please send us your feedback/suggestions at webmaster@SAPTechnical.COM 

HomeContribute About Us Privacy Terms Of Use • Disclaimer • SafeCompanies: Advertise on SAPTechnical.COM | Post JobContact Us  

Graphic Design by Round the Bend Wizards

footer image footer image