cancel
Showing results for 
Search instead for 
Did you mean: 

Cron job requirement - Java scheduler

former_member194786
Active Contributor
0 Kudos

Hi All,

We have a requirement to schedule a job to trigger a BPM using Java scheduler on every Monday and also on the last working day of the month.

Now, I know I can achieve at least the first part of this requirement easily using Cron job definition. Interesting bit is the 2nd part. Looking at the documentation, I don't think this can be achieved using a single instance of schedule:

Scheduling Jobs with Cron Start Conditions -  Using Central Development Services - SAP Library

Problem with multiple instance of the schedule would be where there is overlap. Or have I misinterpreted the help documentation?

Another interesting constraint is testing of the last working day requirement(due to short time-frame of development and testing lifecycle) and hence any first hand experience with similar requirement would be really useful.

Or alternately, is there a way of referencing a SAP (ECC) factory calendar using Java scheduler?

Note: I would like to avoid scheduling and triggering interface from ECC system.

Thanks in advance.

Regards,

Sanjeev

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member194786
Active Contributor
0 Kudos

Couldn't find any way of making this work, so had to resort to a work-around. I decided to schedule the BPM to run on all days from 26-31 of each month. And then in BPM using a custom ejb function I evaluated if the current date was last working date or not. If the current date is last working day, I perform the tasks as required, else skip processing. Still need to test the ejb works smoothly by testing on coming weekend, fingers crossed.

Cheers,

Sanjeev

engswee
Active Contributor
0 Kudos

Hi Sanjeev

How do you determine the last working day in the custom EJB since this needs to reference the local holiday calendar in that month? RFC call to get ECC's factory calendar?

Regards

Eng Swee

former_member194786
Active Contributor
0 Kudos

Hi Eng Swee,

My requirement was just last weekday of the month, so didn't explore much on the factory calendar.

If business does come back with a requirement to schedule on only working day, will probably explore that.

Cheers,

Sanjeev.

former_member194786
Active Contributor
0 Kudos

Any inputs please?

former_member194786
Active Contributor
0 Kudos

Bumping up the thread.