PL/SQL (MOSC)

MOSC Banner

Creating a perpetually running scheduler job

edited Oct 7, 2016 1:42AM in PL/SQL (MOSC) 5 commentsAnswered

Hello all

I am helping a colleague making a scheduler job run perpetually. It needs to be robust and restart gracefully after both local failures/errors and database restarts. And in case of failures, it needs to restart after not too long time (minutes, not more).

Right now, the job is started once manually and runs an infinite loop. My opinion is that this can/should be made much more robust.

Simplified pseudo-code is along these lines:

procedure Exec_remote /* This is on another database, called across a database link */

as

begin

  dbms_aq.Dequeue (/* timeout = 10 */);

end;

/

declare -- this is run from scheduler job (which is run once)

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center