Simón,

Maybe the behavior difference is caused an environment variable that's
set by the login shell when sourcing /etc/profile when you do an
interactive login.  I've gotten owned by that on too many occasions to
count.

Jeremy

On Fri, Oct 24, 2008 at 1:14 PM, Simón Ruiz <[EMAIL PROTECTED]> wrote:
> Hello, all,
>
> I know we discussed briefly that bash scripts and cron jobs interact
> in less than intuitive ways.
>
> The following cron command, for example, is in the system's cron (at
> least that's what I *think* I'm editing when I do "crontab -e" as
> root) of a Samba print server.
>
> 0 0 * * * /root/synch_printers_from 10.0.0.7 &> /root/lastsynch.log
>
> First of all, am I right in my guess that /root/lastsynch.log doesn't
> show anything because there's a space betwen the ">" and the "/"?
> Oops...
>
> More importantly, though, the "/root/synch_printers_from" script here
> basically pulls down Samba and CUPS, copies over configuration files
> from the target server (using scp) and then brings Samba and CUPS back
> up.
>
> However, while it seems to work perfectly every single time I run it
> directly through bash it seems to fail to bring samba back up every
> single time it runs as a cron job.
>
> Does anyone have any suggestions as to where I might look for a culprit?
>
> Simón
>
> _______________________________________________
> Fwlug mailing list
> [email protected]
> http://fortwaynelug.org/mailman/listinfo/fwlug_fortwaynelug.org
>



-- 
Jeremy

_______________________________________________
Fwlug mailing list
[email protected]
http://fortwaynelug.org/mailman/listinfo/fwlug_fortwaynelug.org

Reply via email to