old tony is full of bs ==>> that is -bs & -bg

Brian K. White brian at aljex.com
Tue Jul 18 14:16:49 PDT 2006


----- Original Message ----- 
From: "Tony Freehauf" <tony at ynotsoftware.com>
To: <filepro-list at lists.celestial.com>
Sent: Tuesday, July 18, 2006 11:29 AM
Subject: old tony is full of bs ==>> that is -bs & -bg


> hi experts
> i want to perform some tasks from cron
> and i think it would be a good idea to add -bs & -bg at the end of the 
> filepro lines
>  should the same line also have term defined as in something like 
> TERM=whatever; export TERM; /appl/whatever -bs -bg
>                 wait
>                do next filepro thing ...
> when i do that should a unix   wait   following each line?
> thanks for your help
> old tony

On SCO Open Server, if it's 5.0.6 or earlier, install oss642a, cron update.
Directions: ftp://ftp.sco.com/pub/openserver5/oss642a.ltr
If it's a box I ever worked on for you this has probably already been done.
This gives you a new cron that allows you to add variables at will in 
/etc/default/cron
If it's 5.0.7 you already have it.

Now in /etc/default cron add these lines at the bottom like this:

setenv TERM=ansi
setenv PFMBTO=1
setenv PFSKIPLOCKED=1

I also add handy things like 
:/u/appl/fp:/usr/local/bin:/usr/gnu/bin:/u/aljex/bin to the setenv PATH=... 
line that already exists in there.

I also add  setenv CRON=true  so that I can test for that in some of my 
scripts that I want to run manually sometimes and in cron sometimes, and 
want different behaviour depending.
So I have scripts that will make sure never to try to prompt for user input 
if CRON=true

Then restart cron so it reads the new config
/etc/init.d/cron stop
/etc/init.d/cron start

Now all cron jobs have these variables set and you don't have to do anything 
special.
More/most things that you run manually will "just work" in cron now.
This means you don't have to add these to each individual scripts or the 
crontab line itself etc..


In the case of Linux, most Linux these days has (among many other 
differences) a file /etc/crontab

The format of this file is somewhat different from a traditional crontab 
files like SCO.
At the top of the file you can just add variables at will like this:

PATH=/usr/bin:/usr/sbin:/sbin:/bin:/usr/local/bin:/usr/local/sbin:/u/appl/fp:/u/aljex/bin
CRON=true
TERM=linux
PFMBTO=1
PFSKIPLOCKED=1

Again, this sets up these variables for all cron jobs and you don't have to 
dctor individual scripts most of the time.

Brian K. White  --  brian at aljex.com  --  http://www.aljex.com/bkw/
+++++[>+++[>+++++>+++++++<<-]<-]>>+.>.+++++.+++++++.-.[>+<---]>++.
filePro  BBx    Linux  SCO  FreeBSD    #callahans  Satriani  Filk!



More information about the Filepro-list mailing list