Mailinglist Archive: opensuse (2217 mails)
| < Previous | Next > |
Re: [opensuse] crontab problem? How to debug?
- From: "Peter Van Lone" <petervl@xxxxxxxxx>
- Date: Fri, 14 Sep 2007 09:29:12 -0500
- Message-id: <68b791330709140729n221bc69fv8333227ba16abaf2@xxxxxxxxxxxxxx>
On 9/14/07, Carlos E. R. <robin.listas@xxxxxxxxxxxxxx> wrote:
>
> Not incorrect, different. The path, and other environment variables, that
> programs running as cron jobs get are different that what they get when
> running normally. Whether this is a problem or not depends on each
> particular script, program, whatever. That's why some usually declare
> their own path inside the script.
well since the exact same script works from shell (logged in as same
user) but not from crontab ... then that would seem to suggest
somthing about the crontab env specifically, correct?
Where would I look to find what env variables are being set in crontab
-- or to compare those to what is set for this user in the shell?
> Usually, you look at logs and output. There is no general easy method to
> know which file can't be opened, unless the programs says so clearly.
> Perhaps you can do a "trace" of the program.
>
> ¿Can that file,
> '/home/httpd/htdocs/devestore.ourdomain.com/website/export/order_export.php'
> be opened? Check all dirs in the path.
I think that the script is reporting that the file cannot be opened
... but from shell is fine.
> I would perhaps write debugging strings to the console or a log file from
> the script so that you can check what the program is really doing. Old
> style ;-)
I will suggest that ... good idea
Wish I knew more about debugging this kind of thing ... I'll go dig
around some, but will probably end up posting back with more
questions!
Peter
--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx
>
> Not incorrect, different. The path, and other environment variables, that
> programs running as cron jobs get are different that what they get when
> running normally. Whether this is a problem or not depends on each
> particular script, program, whatever. That's why some usually declare
> their own path inside the script.
well since the exact same script works from shell (logged in as same
user) but not from crontab ... then that would seem to suggest
somthing about the crontab env specifically, correct?
Where would I look to find what env variables are being set in crontab
-- or to compare those to what is set for this user in the shell?
> Usually, you look at logs and output. There is no general easy method to
> know which file can't be opened, unless the programs says so clearly.
> Perhaps you can do a "trace" of the program.
>
> ¿Can that file,
> '/home/httpd/htdocs/devestore.ourdomain.com/website/export/order_export.php'
> be opened? Check all dirs in the path.
I think that the script is reporting that the file cannot be opened
... but from shell is fine.
> I would perhaps write debugging strings to the console or a log file from
> the script so that you can check what the program is really doing. Old
> style ;-)
I will suggest that ... good idea
Wish I knew more about debugging this kind of thing ... I'll go dig
around some, but will probably end up posting back with more
questions!
Peter
--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx
| < Previous | Next > |