Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Crontab does not work on SCO Unix???

Status
Not open for further replies.

aluris

Programmer
Jan 15, 2003
9
US
Hi,

1) Our applications are migrating from
AIX 4.3.3 to SCO Open Server Release 5.

2) When we set up the "crontab" on SCO Box, it is not working..I mean no jobs are running...
Whereas on AIX box everything was fine..

Can you help me in "how to go about", please...

Thanks
 
I thought this additional information may be useful in helping me.

The crontab entries on the SCO Box are written like this

"30 6 * * * `. /u/xxx/.profile >/dev/null 2>&1; /u/xxx/scripts/xxx/xx.sh >/dev/null 2>&1` ".
 
If you are on 5.0.4, 5.0.5, or 5.0.6 you may find that the crontab patch will help.

There has been all sorts of discussions about how permissions and paths are involved and fixing them will fix crontab, but in my couple of experiences the patch was all it took.
Ed Fair
unixstuff@juno.com
Any advice I give is my best judgement based on my interpretation of the facts you supply. Help increase my knowledge by providing some feedback, good or bad, on any advice I have given.
 
Hi,

1. Thanks for your reply. As suggested I will give you the feedback.

2. Where can I find "the crontab patch" that u suggested and what is its function? Could you throw more light, Please!!

3. Also, I noticed, on the SCO Unix ( I am on 5.0.5 ), that
a) when I edit the crontab entries and save, I observed the messasge
"warning: commands will be run from /bin/sh"
I assumed they run from "/bin/ksh"
Any help on this message... Please!!!

Thanks
 
Do a google search on "sco crontab patch". Should get a hit for the download site.

Tony Lawrence's site has a thread about the error message. It is an advisory message that cron will use a different shell than you are using. Ed Fair
unixstuff@juno.com
Any advice I give is my best judgement based on my interpretation of the facts you supply. Help increase my knowledge by providing some feedback, good or bad, on any advice I have given.
 
1. Did the google search. No luck on "sco crontab patch" that u suggested.
2. Did u use "crontab patch" that you suggested? If so what is it and how did you use?

Thanks
 
I downloaded it from the SCO server. I don't have access to one of the systems that has it installed so I don't know the patch number.

You generally download it to a floppy via windows machine and use custom to install it.

In my case the specific problem was a 6AM call to to /usr/bin/backup that wouldn't process. backup did a tar of a data directory to another filesystem.

Since you ask how to install a patch, can I assume that you don't have any other patches installed? There are 3 that are strongly suggested for 5.0.5, made as 4 installs.

You probably need to do some reading at Tony Lawrence's website. Ed Fair
unixstuff@juno.com
Any advice I give is my best judgement based on my interpretation of the facts you supply. Help increase my knowledge by providing some feedback, good or bad, on any advice I have given.
 
I had a similar problem with a SCO 5.0.5 machine. I couldn't figure out what was wrong with it but as as test I removed all the redirection and just left the raw command, eg your command would look like this:

30 6 * * * `. /u/xxx/.profile >/dev/null

Once I removed the redirects, my cron worked fine. I don't know if there is a limit on the number of characters per line or something like that,
 
I think the crontab patch Ed mentions can be accessed via
I haven't applied it myself yet (but I haven't been AWARE of experiencing any problems with cron), but it certainly makes sense to apply if you're having trouble.

I must admit, I don't understand the use of the backticks in the crontab entry. If I read it right you are asking cron to run the _result_ of your command, which (since you are redirecting all your output to null) should be nothing. Meanwhile the commands should be evaluated, so you SHOULD be getting what you want.

Since it ISN'T working, why not try:

30 6 * * * (/u/xxx/.profile; /u/xxx/scripts/xxx/xx.sh) >/dev/null 2>&1
 
I thank everybody for their inputs.

I will share with you all as to what our resolution was, once implemented.

Again Thanks a Lot
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top