dbTalk Databases Forums  

BACKGROUNDS file job control driving me batty

comp.databases.pick comp.databases.pick


Discuss BACKGROUNDS file job control driving me batty in the comp.databases.pick forum.



Reply
 
Thread Tools Display Modes
  #11  
Old   
David Ruggiero
 
Posts: n/a

Default Re: BACKGROUNDS file job control driving me batty - 05-27-2010 , 11:50 PM






@Kevin: D3 7.3.6NT (yes, old, sue me, client won't upgrade)

@Tony: Yes, I'd seen the source in dm,bp, but having code doesn't help
when it doesn't really document the control file structure (in this
case, BACKGROUNDS). For example, the meaning/purpose of the "STATUS"
attribute <24> is completely undocumented and opaque, even with the
code in hand.

@Dale - thanks! I changed 24 to "Q" and got three of the four jobs
fired off, and they seem to be set to run automatically each night
now. Thanks much.

But the fourth job is the problem. As soon as it gets hit by
(presumably) the scheduler, STATUS/<24> changes to "R" (what does this
mean??) and STARTABLE/<26> changes to "N" (job disabled). There is NO
output in BACKGROUNDS.OUTPUT and NO record in BACKGROUNDS.REPORT to
explain this - it just silently changes and never seems to start
again.

Is there any way to debug this? I can go to the account and run it
manually, just fine. It's just simple basic program that takes no
input. Ideas to debug it and find out why the background scheduler
hates it?

thanks all!


Quote:
Check line 24, I believe that is an eye. *If I remember things right
that means the item is being acted upon and is in 'Interactive' mode.
At least in linux, this would mean that the background phantom
processor started working with the control record but could not
complete the job, of the phantom crashed. *Change this to a 'Q' to
allow the phantom to continue processing the record.

hth

Dale

On May 25, 7:16*pm, Pickteam <pickteamsoftw... (AT) gmail (DOT) com> wrote:



*On D3/Linux I just schedule nightly/weekend jobs in D3 via "cron" and
it works great - but I don't really have that option under D3/NT. So I
think I have to schedule repeating jobs via the BACKGROUNDS file
(yes?). Yet I'm finding the D3 background processor change/edit
interface damn near impenetrable...gotta *be the worst interface
design since [fill in your favorite horror story GUI here]

The following is a job in the BACKGROUNDS file item - just a simple
program - FREDS_DUMP - that I can run from TCL, and I want to run
automatically in the XB account every night at around 4AM. But it
doesn't seem to be kicking off. What's the trouble and how might I fix
it??

thanks
Pick Guy

001 DM
002 2
003 n
004 FREDS_DUMP
005 R
006 15486
007 14520
008 1
009
010 N]y]y]y]y]y]N
011
012
013 13995
014 60726
015
016
017
018
019
020 492
021
022
023 131
024 I
025 XB
026 T

Reply With Quote
  #12  
Old   
Kevin Powick
 
Posts: n/a

Default Re: BACKGROUNDS file job control driving me batty - 05-28-2010 , 08:25 AM






On 2010-05-27 22:15:36 -0400, Mike Preece <michael (AT) preece (DOT) net> said:

Quote:
Well - I don't work. Is that right?
It's probably not right, but maybe you can be fixed.

--
Kevin Powick

Reply With Quote
  #13  
Old   
Dale
 
Posts: n/a

Default Re: BACKGROUNDS file job control driving me batty - 05-28-2010 , 11:40 PM



On May 27, 9:50*pm, David Ruggiero <thatseattle... (AT) gmail (DOT) com> wrote:

The original code for the jobs phantom processor was available...
Donno if it still is.

Here is what I remember...

attr 24 = Q and 26 = T Means that the job is queued and timed to
start

When the background process finds a job that is past due to run, it
changes 24 to I (eye) (interactive) and I'm not sure if anything
happens to 26. Then the backgrounds processor 'Z'eds off the job and
starts the program BGRUN with a smack of parameters from the
Background item.

The BGRUN program changes <24> to 'R' (running) and 26 to 'N' (not
startable).

When the process has been completed, BGRUN re-queues the job for the
next time as defined by the parameters in the BACKGROUNDS control
item. (maybe the master background processor did this)

Take a look for the source code!!! It was included with D3/Linux 7.2

A few things can mess up the works

1. The job that you want to run on a periodic basis could log off the
port and therefore BGRUN cannot complete the re-queue process.

2. For some reason more than one master phantom process starts and
therefore you get multiple processes trying to launch processes.
Things get messed up in the lock table and lotsa stuff gets hung up.

What I did was I created a background process to monitor the
background jobs and report any problems via e-mail. I had an item
call 'backgrounds_that_must_run' that held the keys to the background
jobs (backups, email processor, etc.) that needed to keep running with
a Value-mark and the time allotted for the job to complete. (The same
sort of list that would be created by a SSELECT when using a sort by-
exp MV's are used.) Usually the email stated that all was okay, but
on occasion I would get notified that something got hung up, and a
small intervention got the job running again.

If I didn't get the email then either the background process master
program was hung, multiple master programs were running, or the email
processing program had multiple instances running. You do have to
consider the lack of a report as a problem.

Quote:
@Dale - thanks! I changed 24 to "Q" and got three of the four jobs
fired off, and they seem to be set to run automatically each night
now. Thanks much.

But the fourth job is the problem. As soon as it gets hit by
(presumably) the scheduler, STATUS/<24> changes to "R" (what does this
mean??) and STARTABLE/<26> changes to "N" (job disabled). There is NO
output in BACKGROUNDS.OUTPUT and NO record in BACKGROUNDS.REPORT to
explain this - it just silently changes and never seems to start
again.

Reply With Quote
  #14  
Old   
Mike Preece
 
Posts: n/a

Default Re: BACKGROUNDS file job control driving me batty - 05-29-2010 , 10:05 AM



On May 28, 2:25*pm, Kevin Powick <nos... (AT) spamless (DOT) com> wrote:
Quote:
On 2010-05-27 22:15:36 -0400, Mike Preece <mich... (AT) preece (DOT) net> said:

Well - I don't work. Is that right?

It's probably not right, but maybe you can be fixed.

--
Kevin Powick
Fixed = Working

Reply With Quote
  #15  
Old   
David Ruggiero
 
Posts: n/a

Default Re: BACKGROUNDS file job control driving me batty - 05-30-2010 , 04:16 PM



"...> The BGRUN program changes <24> to 'R' (running) and 26 to
'N' (not startable)."
"> 1. The job that you want to run on a periodic basis could log off
the port and therefore BGRUN cannot complete the re-queue process."

BINGO! Beverage of Dale's choice coming to him.

The procedure was chaining "OFF" at the end, so the BACKGROUNDs item
was still in a running state, perpetually.

Don't know why - and more to the point, don't know how it worked as a
phantom job successfully for many years.
But taking out the logoff fixed it ( = working .

thanks much, Dale.

--Pickteam


Quote:
The original code for the jobs phantom processor was available...
Donno if it still is.

Here is what I remember...

attr 24 = Q *and 26 = T * Means that the job is queued and timed to
start

When the background process finds a job that is past due to run, it
changes 24 to I (eye) (interactive) and I'm not sure if anything
happens to 26. *Then the backgrounds processor 'Z'eds off the job and
starts the program BGRUN with a smack of parameters from the
Background item.

The BGRUN program changes <24> to 'R' (running) and 26 to 'N' (not
startable).

When the process has been completed, BGRUN re-queues the job for the
next time as defined by the parameters in the BACKGROUNDS control
item. *(maybe the master background processor did this)

Take a look for the source code!!! *It was included with D3/Linux 7.2

A few things can mess up the works

1. *The job that you want to run on a periodic basis could log off the
port and therefore BGRUN cannot complete the re-queue process.

2. *For some reason more than one master phantom process starts and
therefore you get multiple processes trying to launch processes.
Things get messed up in the lock table and lotsa stuff gets hung up.

What I did was I created a background process to monitor the
background jobs and report any problems via e-mail. *I had an item
call 'backgrounds_that_must_run' *that held the keys to the background
jobs (backups, email processor, etc.) that needed to keep running with
a Value-mark and the time allotted for the job to complete. (The same
sort of list that would be created by a SSELECT when using a sort by-
exp MV's are used.) *Usually the email stated that all was okay, but
on occasion I would get notified that something got hung up, and a
small intervention got the job running again.

If I didn't get the email then either the background process master
program was hung, multiple master programs were running, or the email
processing program had multiple instances running. *You do have to
consider the lack of a report as a problem.





@Dale - thanks! I changed 24 to "Q" and got three of the four jobs
fired off, and they seem to be set to run automatically each night
now. Thanks much.

But the fourth job is the problem. As soon as it gets hit by
(presumably) the scheduler, STATUS/<24> changes to "R" (what does this
mean??) and STARTABLE/<26> changes to "N" (job disabled). There is NO
output in BACKGROUNDS.OUTPUT and NO record in BACKGROUNDS.REPORT to
explain this - it just silently changes and never seems to start
again.

Reply With Quote
  #16  
Old   
Dale
 
Posts: n/a

Default Re: BACKGROUNDS file job control driving me batty - 05-30-2010 , 09:33 PM



On May 30, 2:16*pm, David Ruggiero <thatseattle... (AT) gmail (DOT) com> wrote:
Quote:
"...> The BGRUN program changes <24> to 'R' (running) and 26 to
'N' (not startable)."
"> 1. *The job that you want to run on a periodic basis could log off
the *port and therefore BGRUN cannot complete the re-queue process."

BINGO! Beverage of Dale's choice coming to him.

Hmmm.... It's going to get hot here soon...

A finely crafted wheat beer would quench the thirst nicely!

Glad I could help.

Dale
Quote:
The procedure was chaining "OFF" at the end, so the BACKGROUNDs item
was still in a running state, perpetually.

Don't know why - and more to the point, don't know how it worked as a
phantom job successfully for many years.
But taking out the logoff fixed it ( = working .

thanks much, Dale.

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.