Mailinglist Archive: opensuse (2217 mails)
| < Previous | Next > |
Re: [opensuse] crontab problem? How to debug?
- From: "Jeffrey L. Taylor" <abluz@xxxxxxxxxxxxxxxx>
- Date: Fri, 14 Sep 2007 19:14:13 -0500
- Message-id: <20070915001412.GA9138@xxxxxxxxxxxxxxxxxxxxxx>
Quoting Peter Van Lone <petervl@xxxxxxxxx>:
> 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?
Cron runs programs directly, not thru the shell. IIRC, if you use
file globbing or other shell specific special characters, cron will
call the shell to call the program. Or you can explicitly invoke the
shell, e.g.:
/bin/sh -c "/home/user/cronjob arg1"
HTH,
Jeff
--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx
> 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?
Cron runs programs directly, not thru the shell. IIRC, if you use
file globbing or other shell specific special characters, cron will
call the shell to call the program. Or you can explicitly invoke the
shell, e.g.:
/bin/sh -c "/home/user/cronjob arg1"
HTH,
Jeff
--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx
| < Previous | Next > |