Author Topic: Scheduler Sleeping  (Read 5374 times)

DonQuixote

  • Rock Star
  • *****
  • Posts: 205
  • To Dream the Impossible Dream...
Scheduler Sleeping
« on: August 02, 2012, 03:22:42 PM »
Has anyone ever had a Scheduler issue that caused all jobs to sleep past their normal start times or to freeze for no reason?
I added a program to the job stream that uses the SLEEP command in the basic program.  Is it possible that "SLEEP" adversely effects the job stream?  Years ago I heard of ill effects of the SLEEP command but that is an issue for the fading memories of history. LOL.



precisonline

  • President
  • Administrator
  • Rock Star
  • *****
  • Posts: 1612
    • Precision Solutions
Re: Scheduler Sleeping
« Reply #1 on: August 14, 2012, 11:03:30 PM »
Not that I've ever heard of.  Sleeping in a scheduled job should have no impact on the scheduler itself.
-Kevin
Accidents "happen"; success, however, is planned and executed.

DonQuixote

  • Rock Star
  • *****
  • Posts: 205
  • To Dream the Impossible Dream...
Re: Scheduler Sleeping
« Reply #2 on: February 01, 2013, 09:22:31 AM »
This is still an issue?!?!?  Here's a theory, tell me what you think.   You know the difference between EXECUTE and PERFORM.  My understanding is that EXECUTE starts all new sessions as PERFORM does not.  Could this scheduler be PERFORMing the jobs and for some reason all future jobs are affected from my SLEEP command.  Would it be worth running my program either manually or as a cron job but the point being totally separate from the others.  Some programs just don't play well with others   ;)

precisonline

  • President
  • Administrator
  • Rock Star
  • *****
  • Posts: 1612
    • Precision Solutions
Re: Scheduler Sleeping
« Reply #3 on: February 01, 2013, 12:39:10 PM »
The differences between EXECUTE and PERFORM would not explain this.  The Prelude scheduler should be launching individual phantoms for each job, in which case other than record locking, one job should not be able to make another job block.
-Kevin
Accidents "happen"; success, however, is planned and executed.

DonQuixote

  • Rock Star
  • *****
  • Posts: 205
  • To Dream the Impossible Dream...
Re: Scheduler Sleeping
« Reply #4 on: February 06, 2013, 09:22:39 AM »
Update:  I'm getting the impression from Prelude that their Scheduler uses the SLEEP command and apparently you cannot use a SLEEP within a SLEEP.
The work around, in my case, is to schedule a job that runs every 15 minutes for a 3 hour period (aka specify the starting time and repeat every 15 minute for 12 times).  If it finds what its looking for then complete the task (in my case send emails) and set a flag that the task has been completed today; if not found then stop.  So the first thing my program does is to check the flag (task completed today).

The "Scheduler" limitation is not being able to set a schedule within a schedule.  In other words this "Monthly task" has to become a "one day task repeated every 15 min" and entered for every month.

I had written a "Scheduler" years ago and incorporated cron so using 'SLEEP' was not necessary.

precisonline

  • President
  • Administrator
  • Rock Star
  • *****
  • Posts: 1612
    • Precision Solutions
Re: Scheduler Sleeping
« Reply #5 on: February 06, 2013, 09:51:15 AM »
I think we must be missing something simple.  None of this should be that complex.  i'll call you shortly.
-Kevin
Accidents "happen"; success, however, is planned and executed.