Hourly Background Jobs
Hi,
We have a few background jobs setup which collect information from customer tables and ftp's the data into a legacy system to keep the systems in sync.
One job for example currently runs hourly at 25 past every hour every day. Is there a way in SM37 i can limit the jobs to run periodically every hour but from the hours of 8am to 6pm as an example?
I noticed there was an operation mode field in the background job, if I was to set the job up to run at 30 minutes past the hour periodically every hour and assigned it too our operation mode called "daytime" which runs from 7am - 7pm would the job only run between these periods or is there no way to achieve what I am after.
Any help or advice appreciated.
Regards,
Chad
Its easier than assigning a daily job at each hour which is the only way without getting more complex and adding a check to an ABAP
_________________
regards,
Chap
Is there a way in SM37 i can limit the jobs to run periodically every hour but from the hours of 8am to 6pm as an example?
Not supported by standard SAP. Supported by BatchMan
(add-on for SAP).
you could run your jobs event-driven with a second step containing an abap which sets the event - but only in your working-hours. i have done so for scheduling 3 different mrp-runs in 3 intervalls of daily business in batch from 0800 to 1800. would only be a small abap, nothing fancy - goes like this:
START-OF-SELECTION.
IF SY-UZEIT BETWEEN INT1-LOW AND INT1-HIGH.
CALL FUNCTION 'BP_EVENT_RAISE'
EXPORTING
EVENTID = EVENT1
EXCEPTIONS
BAD_EVENTID = 1
EVENTID_DOES_NOT_EXIST = 2
EVENTID_MISSING = 3
RAISE_FAILED = 4
OTHERS = 99.
CASE SY-SUBRC.
WHEN 0.
MESSAGE S250 WITH EVENT1.
WHEN 1.
MESSAGE E042 WITH EVENT1.
WHEN 2.
MESSAGE E042 WITH EVENT1.
WHEN 3.
MESSAGE E038.
WHEN 4.
MESSAGE E249 WITH EVENT1.
ENDCASE.
ELSEIF SY-UZEIT BETWEEN INT3-LOW AND INT3-HIGH.
CALL FUNCTION 'BP_EVENT_RAISE'
EXPORTING
EVENTID = EVENT2
EXCEPTIONS
BAD_EVENTID = 1
EVENTID_DOES_NOT_EXIST = 2
EVENTID_MISSING = 3
RAISE_FAILED = 4
OTHERS = 99.
CASE SY-SUBRC.
WHEN 0.
MESSAGE S250 WITH EVENT2.
WHEN 1.
MESSAGE E042 WITH EVENT2.
WHEN 2.
MESSAGE E042 WITH EVENT2.
WHEN 3.
MESSAGE E038.
WHEN 4.
MESSAGE E249 WITH EVENT2.
ENDCASE.
ELSEIF SY-UZEIT BETWEEN INT2-LOW AND INT2-HIGH.
CALL FUNCTION 'BP_EVENT_RAISE'
EXPORTING
EVENTID = EVENT3
EXCEPTIONS
BAD_EVENTID = 1
EVENTID_DOES_NOT_EXIST = 2
EVENTID_MISSING = 3
RAISE_FAILED = 4
OTHERS = 99.
CASE SY-SUBRC.
WHEN 0.
MESSAGE S250 WITH EVENT3.
WHEN 1.
MESSAGE E042 WITH EVENT3.
WHEN 2.
MESSAGE E042 WITH EVENT3.
WHEN 3.
MESSAGE E038.
WHEN 4.
MESSAGE E249 WITH EVENT3.
ENDCASE.
_________________
rgds
fish