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: 

Job Scheduling

Former Member
0 Kudos

Is there a way where I can schedule a job to run every 15 minutes from 7:30 AM to 5:00 PM? I can create a periodic job to run every 15 minutes but how do I restrict it not to run between 5PM and 7:30 AM? Thanks.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

My restriction choice is rather limited. I have "Always execute Job", "Do not execute job on Sundays or Holidays", "Move job to previous day" and "Move job to next workday". None of these restrictions really help me. Is there a way I can introduce a new restriction to not start between 5PM and 7:30AM?

5 REPLIES 5

Former Member
0 Kudos

Hi

see this and do accordingly

Create a Variant for the Program and

Schedule JOB in background:

Go to SM36 create a Job

enter Program and Variant for that program in STEP..

click on Start Condition

Click on DATE and TIME enter date scheduled Start and END times

click on Period Values

Click on HOURLY/WEEKLY etc

CLick on RESTRICTIONS also to use further criteria.

so your job will be scheduled and run as per your requirement.

and in SM37 Transaction check the status of that JOB

Check this link for scheduling jobs..

http://help.sap.com/saphelp_nw2004s/helpdata/en/c4/3a7f87505211d189550000e829fbbd/content.htm

Regards

Anji

Former Member
0 Kudos

My restriction choice is rather limited. I have "Always execute Job", "Do not execute job on Sundays or Holidays", "Move job to previous day" and "Move job to next workday". None of these restrictions really help me. Is there a way I can introduce a new restriction to not start between 5PM and 7:30AM?

0 Kudos

Yes, you are right... there isn't any restriction parameter which can help you.

If you are allowed to change the program than in program you can check the system time and if that time falls in your range than you can proceed futther otherwise simply stop the program like:

START-OF-SELECTION.
  GET TIME FIELD L_FIELD.
  IF L_fIELD < '170000' AND L_FIELD > '073000'.
    STOP.
  ENDIF.

Regards,

Naimesh Patel

Former Member
0 Kudos

I don't know of a way to do this (and I've looked). You could put a statement in the program that if the system time is not within the time you want it to run, it exits without doing anything.

Rob

Former Member
0 Kudos

Tom,

Doesn't your company use an external scheduling software (such as Control-M or Maestro)? They can handle such requests easily.

Next option is to modify the program as suggested by other SDNers.

Third option is to create 38 jobs. Each of them run once a day. However, the run time is offset by 15 minutes.