Skip to Content

Is it possible to set a batch job to run on the last day of the month?

We need to have a job run on the Last day of every month at 11:30 PM.

Is this possible?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    avatar image
    Former Member
    May 12, 2008 at 01:39 PM

    Hi Neil,

    I've been looking into running a job of ours on the last day of each month and I think this is the way to do it, but you need to test it out of course. It seems to work for us but I don't know if your set up is the same as ours!! I did this for an internal job of ours not an SAP job but you must be able to apply the same method. Once you have initally scheduled the job then using SM37, you can change the job in the normal way (shift F11 for example) . (Of course you can also do this when you run the job initially and then set to run in background mode)

    Click on Start Condition.

    In the Start Time pop up - Click on the >> on the upper right hand side of the screen

    Enter in a relevant 7 day factory calendar (I used Y3 - which is the 7 day inc BH calendar)

    Enter in workday 1.

    Enter in the start time - in your case 23:00:00.

    Leave the default in the do not execute before field (current date)

    Click Workday relative to End of Month.

    Then enter how many months you want this to run for

    Then save.

    When you then go back into this, it shows the last day of the month as the scheduled time.

    Note that this is the first time I've tried this so I don't know how effective it is but I believe this will work.

    I'm not a guru, just a BASIS admin relative beginner!! Hope this helps you



    Add comment
    10|10000 characters needed characters exceeded

    • Thanks for the help!

      We created a new calendar and set it to a 7 day work week including Holidays.

      We tested by setting the Do not start before field to July 1st, August 1st, etc.. and checking the Job start on the main page for creating the batch job. For each month the Job start was the last day of the month.

  • Apr 24, 2008 at 09:58 PM

    Yes, you can schedule a job to run monthy at SM37... just schedule the start date at the end of the month an set the job periodical value to monthly.



    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Juan,

      I think there is a trick here because some months will have 31 days, some will have 30 and Feburary would have either 28 or 29 depending on whether it is leap year or not.What is your take on this ? I mean if you schedule a job to run on 15th and make it monthly periodic it will run every month on 15th coz every month has 15th in it. But last day of the month is a variable quantity.



  • avatar image
    Former Member
    Apr 25, 2008 at 06:24 AM

    In SM36 - Go to Start Conditions - Go to restrictions, Select - related Factory Calender, Workday and workday relative to End of Month.

    It should answer your question.

    Add comment
    10|10000 characters needed characters exceeded

    • I think your best shot is to schedule the jobs manually... is not a lot of work to configure 12 jobs.

      Actually you probably spended more time looking into it that the time it would take to schedule the jobs... sometimes simplycity is the best way to go.