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: 

Batch Jobs Problem

Former Member
0 Kudos

Hi all!

I have a batch job that runs hourly and now I need it to stop. I had scheduled it to end at the start of May 2. However, when I got in this morning, I found out that it still ran today and processed a file early this morning which it shouldn't have. And when I checked the batch job, it seems that everytime the batch job runs, the end date also gets extended another hour. The file is a valid file but my problem is why the batch job still ran when I had scheduled it to stop at the start of today?

Thanks in advance!

5 REPLIES 5

Former Member
0 Kudos

Hi Liz,

A batch job that is marked as a "Periodic" job will act as you have described. The job starts, executes and the scheduling of the next kick off time is done as part of the finishing process. Thus, each job schedules it's predecessor as part of it's functionality.

Go into SM36 where the job is defined and uncheck the box that says "Periodic" job. Then execute it and check to make sure after it executes that there is not another job ready to run under the same name in an hour.

Hope this helps

Brent

Former Member
0 Kudos

Hi Liz,

Go to SM37 and enter your job name. In the checkboxes below, check 'Released' only and uncheck all others. In the date range give a future date in the 'To' date.

Once you get the list(there should only be one that is in released status), select that and delete(trash can in the application toolbar). That will remove it from future schedules.

Srinivas

0 Kudos

Why didn't it stop on the date specified? Why did it keep on extending the end date and time. Since the job runs hourly it also extended the enddate and time by another hour. Why did it do that?

I thought that if you specified an end date and time, the job stops running on that date and time regardless if its a periodic job.

0 Kudos

Unfortunately there is no way of specifying "Do not run After such and such date". The "No Start After" option is only useful if you have a frquently running job and you don't want all the missed schedules to run, say after a system shutdown. See the documentation for that field.

Srinivas

0 Kudos

My understanding is the same as Srinivas, the No start after option is for not restarting a missed schedule date.

The way the periodic job works, scheduling the next job at the completion of the current job - is the reason you have to reschedule the jobs after a system failure - if the job terminates unexpectedly then it doesn't have the opportunity to create the next scheduled job and the chain is broken.

If nothing breaks the chain - they continue indefinitely.