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: 

Automatic Reschedule of Background Jobs

Former Member
0 Kudos

Dear Experts,

I have a background job which runs on daily basis and does some FTP operations.

Now whenever it fails i need to reschedule that background job again automatically.

How should i do this rescheduling task automatically?

Can anyone please help me out with this?

Thanks,

Praveen

6 REPLIES 6

ThomasZloch
Active Contributor
0 Kudos

A periodic job is being automatically rescheduled anyway for the next execution, irrespective of the outcome. Do you want a different behaviour when the job fails? Immediate start? Isn't there an error situation that should be corrected before the next execution?

Please provide more details.

Thomas

0 Kudos

Hi Thomas,

My background program does some FTP operations on a network drive.

Sometimes, that network drive is down and the program fails to connect there.,that network down time is not fixed.

So i want the background job to be run again automatically when ever it fails.

I dont have to make any changes in my report, i just need to re run that program again after some time.

Can you please suggest me how to handle this issue?

Thanks,

Praveen

0 Kudos

I can only think of touching the code and have the report schedule itself for one-time execution X minutes later, this would be only a few extra lines.

Thomas

0 Kudos

Dear Thomas,

Can you please guide me with how to write that code to reschedule the job?

Thanks,

Praveen

0 Kudos

As a hint, you can call GET_JOB_RUNTIME_INFO and BP_JOB_READ to get the details of the current run and feed that into BP_JOB_CREATE, adjusting the starting time as necessary.

Please search for available information as well.

Thomas

0 Kudos

Dear Thomas,

Thanks for all your help,

Thanks,

Praveen