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: 

Background job only for week days

Former Member
0 Kudos
3,191

Hi,

I want to schedule a job only for working days, excluding Saturdays and Sundays.

I checked the options available in the system and weird enough, it was only an option to schedule the job on every day except Sundays and vacation days. I don't want that, I want only from Monday to Friday. What is there to do then? Do I need to define a new factory calendar?

Best regards,

George

1 ACCEPTED SOLUTION

ashish_shah5
Participant
0 Kudos
1,804

Hi George,

First you have to schedule Back Ground Job for everyday.

You have to write code in Program.

Regards.

10 REPLIES 10

ashish_shah5
Participant
0 Kudos
1,805

Hi George,

First you have to schedule Back Ground Job for everyday.

You have to write code in Program.

Regards.

0 Kudos
1,804

I don't like that, there must be something I can do in SM36.

0 Kudos
1,804

Well george ,

All the avaiable option is there in SM36 itself . Be patient and check for some tips below.

In what client language are you logged on ?If it is de(german) then will get a default german calendar.

Select US standard.

In Workday tab provide value as 1(1st work day of month).

To know more on this ckech value of table.

Table : BTCH1011.

Note : All public holidays are taken into consideration accoording to the calendar select.

If u still find a problem let me know that !

0 Kudos
1,804

Hi Rejish,

That still doesn't suffice, because I want the job to run every working day, not every first day of the month or something like that.

How I do it:

sm36 - start condition

I click immediate, specify that it's a periodic job, specify the period as a day and then go to restrictions. Here, from my understanding, I should have the option to tell it that I want it ran only from Monday to Sunday. I can't find that option here, only the option "Do not execute on Sundays or holidays".

I am doing something wrong?

George

P.S. And BTCH1011 is a structure, not a table.

0 Kudos
1,804

In SM36, you could schedule the job 5 times, each with a frequency of "Weekly".

0 Kudos
1,804

Don't you have option "Move job to next workday" available? Combined with a correctly maintained factory calender and a daily period this should do what you want.

Thomas

0 Kudos
1,804

Jerry, great thinking! However, this would mean that they'll also be executed during public holidays, which might not be appropriate.

0 Kudos
1,804

Hi Thomas,

Very true. My concern was for the job, say after a weekend,not to be executed 3 times on Monday. If it will not happen this way, then the problem is solved. I still would like confirmation that it will not happen before I close the thread and award you the 10 points.

George

0 Kudos
1,804

Let's say your job starts on Friday, when scheduling the next start the system will see that Saturday is not a working day according to factory calender, move to next day, Sunday, not a working day, move to next day, Monday, and schedule it once for Monday execution. Work very fine here in my system. It was even skipping six full days around Christmas last year

Thomas

0 Kudos
1,804

Then, problem solved, points awarded.