[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [cobalt-users] [RaQ4] weird cron problem
- Subject: Re: [cobalt-users] [RaQ4] weird cron problem
- From: Larry Smith <lesmith@xxxxxxxxx>
- Date: Thu Jan 9 06:35:01 2003
- Organization: ECSIS.NET
- List-id: Mailing list for users to share thoughts on Sun Cobalt products. <cobalt-users.list.cobalt.com>
On Thursday 09 January 2003 05:49 am, Andy Clyde, oxfordmusic.net wrote:
> i have a cron script set up to run at 7.30am each morning which intercepts
> a mail i get sent at 4am every morning. it's supposed to save the
> attachment (.gz file), unzip it and then run an asp script which parses the
> output and updates a mysql database. only problem is it's not working! i'm
> getting a cron error every morning.
> now when i manually send the mail to the server and manually run the cron
> job, it all works fine.
>
> any ideas? it might be an asp problem (it runs 2 asp scripts - one to save
> the attachment and one to parse it) but i thought i'd run it through the
> list in case there's something i'm missing.
Hmm, when you run it "by hand" are you running as "root" or as an admin, or
some particular user ???
Reason I ask, is when you run from "cron" you run as the user "cron" which
may or may not have the priveleges you need - which would mean it cannot
"save" the file in the location you specify, therefore the first lynx command
will fail (no file created). Am presuming that command works when you do it
by hand (?)
You might try creating the cron script for either the user you are running
as, or for user root to run and see if that works.
30 7 * * * (TERM=vt100; /usr/bin/lynx -source \
http://www.domain.com/script1.asp>/dev/null ; \
gunzip -d stat.csv.gz )
or some such...
--
Larry Smith
SysAd ECSIS.NET
sysad@xxxxxxxxx