01-21-2015 6:38 PM
Hello,
I have been given a requirement to schedule a batch job that repeats every last Tuesday of the month. Right now, I am aware of the option to schedule monthly from a given date. However, that date the following month would not correspond to a Tuesday. Does anyone have any insight as to how I can use SM36 to schedule the job as required? I would much prefer to have it done on a schedule than re-releasing it each month on the specified date.
Thank you in advance for your assistance.
01-21-2015 6:44 PM
Hello Brian,
Please refer this link https://help.sap.com/saphelp_nw70/helpdata/en/c4/3a7f87505211d189550000e829fbbd/content.htm
Regards,
Pravin
01-21-2015 6:57 PM
Hi Pravin,
Thank you for the reply. I am already familiar with how to use SM36 to schedule jobs, as well as the start condition field. My question is if there is anyway, whether using the start condition field or some other method, that SM36 could be used to schedule a job for a certain day of the last week of each month. For example, we have a close period, and I need to schedule a job that will run at 5pm on the last Tuesday before month end. While I could schedule one for 1/27 (Tuesday) this month with a monthly frequency, this would mean it runs on the 27th the following month, which is not a Tuesday. I am wondering if there is a function in SM36 to allow me to schedule this job specific to last Tuesday of each month. Any assistance you can provide would be very helpful.
- Brian
01-21-2015 7:06 PM
See if you can set up a new Factory calendar via OP03, utilizing Special rules to identify the last Tuesday of each month.
01-05-2024 10:03 AM
01-21-2015 7:26 PM
Ugly, but you could do it this way:
Create a program that checks to see if the current date is on the last Tuesday of the month. If it is, submit your job using the job FMs.
Run this as a background daily at 5:00 PM.
Rob
01-21-2015 7:33 PM
Scott and Rob,
Thank you both for the input. I think I am going to explore the Factory calendar method as I am likely to be getting additional job requests with similar type requirements. This looks like it might possibly be a good solution.
01-22-2015 2:01 AM
Hi
I think your way that is right. if the condition is very complex , you should write a program code.
Best regards,
Jimmy Chan
01-22-2015 5:20 AM
I agree
Has a similar requirement to run a report only on Sundays...code was the easiest way to manage it.
Regards
Arden
11-14-2015 7:19 AM
Yes, Even I think its the best option...
Instead of running it daily at 5PM i would say that we can schedule this Program to Run every day on the Last week (date after 22nd of every month!! (keeping FEB as well in mind)!
Just a thought!
Cheers,
Kripa Rangachari!
01-22-2015 5:15 AM
Did you give Report BTCAUX10 a try ?
Setting the Period Parameters accordingly may help you out.
01-05-2024 10:04 AM
11-13-2015 7:08 PM
Hi Brian,
If you are able to use CRON, a CRON expression like this will run a process (or job) at 13:00 the last Tuesday of every month.
Here's a link to Cron on wikipedia if you need it:
https://en.wikipedia.org/wiki/Cron
There are external job schedulers that are capable of setting this up for you.
Here's a link to a list of them.
List of job scheduler software - Wikipedia, the free encyclopedia
Regards,
11-14-2015 5:07 AM