Mailinglist Archive: opensuse (2217 mails)
| < Previous | Next > |
Re: [opensuse] crontab problem? How to debug?
- From: Kenneth Schneider <suse-list3@xxxxxxxxxxxxx>
- Date: Fri, 14 Sep 2007 22:17:37 -0400
- Message-id: <1189822657.10282.82.camel@xxxxxxxxxxxxxxxxx>
On Fri, 2007-09-14 at 19:14 -0500, Jeffrey L. Taylor wrote:
> 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.
Ah, yes it does it uses a non-interactive shell. IIRC it uses bash by
default but you can specify the shell used with the hash bang directive
on the first line:
#!/bin/<shell of your choice>
And then specify other shell env settings to your liking.
--
Ken Schneider
UNIX since 1989, linux since 1994, SuSE since 1998
--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx
> 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.
Ah, yes it does it uses a non-interactive shell. IIRC it uses bash by
default but you can specify the shell used with the hash bang directive
on the first line:
#!/bin/<shell of your choice>
And then specify other shell env settings to your liking.
--
Ken Schneider
UNIX since 1989, linux since 1994, SuSE since 1998
--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx
| < Previous | Next > |