todd@uhccux.uhcc.Hawaii.Edu (Todd Ogasawara) (09/11/90)
I can't seem to get the C-news newsrun script to run from cron in ISC UNIX 2.2. Has anyone else experienced this problem? 'newsrun' works fine if I fire it either when logged in as news or when I manually fire it using 'su -c' as root. -- Todd Ogasawara, U. of Hawaii UUCP: {uunet,ucbvax,dcdwest}!ucsd!nosc!uhccux!todd ARPA: uhccux!todd@nosc.MIL BITNET: todd@uhccux INTERNET: todd@uhccux.UHCC.HAWAII.EDU
cpcahil@virtech.uucp (Conor P. Cahill) (09/11/90)
In article <9298@uhccux.uhcc.Hawaii.Edu> todd@uhccux.uhcc.Hawaii.Edu (Todd Ogasawara) writes: >I can't seem to get the C-news newsrun script to run from cron in ISC UNIX >2.2. Has anyone else experienced this problem? What is hapening? just saying you are having problems doesn't give us much wor work on. You might also want to specify what version (and patchlevel) of cnews you are running. I have cnews running without any problems under 2.2 (I upgraded from 2.0.2 and made no changes to the code since then. >'newsrun' works fine if I fire it either when logged in as news or when I >manually fire it using 'su -c' as root. We run it twice an hour from new's crontab without any problems with the following cron line: 0,30 * * * * /usr/lib/newsbin/input/newsrun If it's not running from cron, but is runs ok from a normal user I would bet that it is an environment problem (probably ulimit). -- Conor P. Cahill (703)430-9247 Virtual Technologies, Inc., uunet!virtech!cpcahil 46030 Manekin Plaza, Suite 160 Sterling, VA 22170
henry@zoo.toronto.edu (Henry Spencer) (09/12/90)
In article <9298@uhccux.uhcc.Hawaii.Edu> todd@uhccux.uhcc.Hawaii.Edu (Todd Ogasawara) writes: >I can't seem to get the C-news newsrun script to run from cron in ISC UNIX >2.2. Has anyone else experienced this problem? It's not unheard-of to have trouble getting shell scripts to run from cron if cron isn't initializing the environment properly. You might see if you can get something trivial like #! /bin/sh echo hi there | mail todd to work first; that will at least tell you whether it's cron or some C-News-specific problem. -- TCP/IP: handling tomorrow's loads today| Henry Spencer at U of Toronto Zoology OSI: handling yesterday's loads someday| henry@zoo.toronto.edu utzoo!henry
art@pilikia.pegasus.com (Art Neilson) (09/13/90)
In article <9298@uhccux.uhcc.Hawaii.Edu> todd@uhccux.uhcc.Hawaii.Edu (Todd Ogasawara) writes: >I can't seem to get the C-news newsrun script to run from cron in ISC UNIX >2.2. Has anyone else experienced this problem? > >'newsrun' works fine if I fire it either when logged in as news or when I >manually fire it using 'su -c' as root. I'm running ISC 2.2 and newsrun runs just fine via the news crontab I've set up. Below is my news user crontab: 0,30 6-23 * * * /usr/lib/newsbin/input/newsrun 0 22,4,10,16 * * * /usr/lib/newsbin/maint/newswatch 59 23 * * * /usr/lib/newsbin/maint/newsdaily 0 2 * * * /usr/lib/newsbin/expire/doexpire Of course you must set up your cron.allow/deny files correctly in /usr/lib/cron so news has permission to run cron jobs. Also, I found Cnews needed the setnewsids setuid utility in order for things to go execute properly, I believe this program lives in /usr/lib/news. -rwsr-xr-- 1 root news 51357 Jun 19 22:47 setnewsids I can't think of anything else offhand which was particular to ISC in getting newsrun to fly. Mail me if I can help further! -- Arthur W. Neilson III | ARPA: art@pilikia.pegasus.com Bank of Hawaii Tech Support | UUCP: uunet!ucsd!nosc!pegasus!pilikia!art
woods@eci386.uucp (Greg A. Woods) (09/13/90)
In article <1990Sep11.214237.19373@zoo.toronto.edu> henry@zoo.toronto.edu (Henry Spencer) writes: > In article <9298@uhccux.uhcc.Hawaii.Edu> todd@uhccux.uhcc.Hawaii.Edu (Todd Ogasawara) writes: > >I can't seem to get the C-news newsrun script to run from cron in ISC UNIX > >2.2. Has anyone else experienced this problem? > > It's not unheard-of to have trouble getting shell scripts to run from cron > if cron isn't initializing the environment properly. You might see if you > can get something trivial like > > #! /bin/sh > echo hi there | mail todd > > to work first; that will at least tell you whether it's cron or some > C-News-specific problem. After you've tried this, if it still doesn't work, carefully scrutinize the cron log (/usr/lib/cron/log), and check the system mailbox of the user running the cron job. SysV cron records errors in the log, and mails stderr output to the user. -- Greg A. Woods woods@{eci386,gate,robohack,ontmoh,tmsoft}.UUCP +1-416-443-1734 [h] +1-416-595-5425 [w] VE3-TCP Toronto, Ontario CANADA