Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 11 Jun 2012 21:47:06 -0500
From:      Chris <racerx@makeworld.com>
To:        freebsd-questions@freebsd.org
Subject:   Re: Newbie question: Why aren't my cron jobs running?
Message-ID:  <4FD6ADAA.1020402@makeworld.com>
In-Reply-To: <jr69bd$gum$3@dough.gmane.org>
References:  <jr683k$gum$1@dough.gmane.org> <CAHu1Y70YJ6voMx2YPfPoxBVhQ5Pje4h%2BfanpLkCKz-CGBMW78w@mail.gmail.com> <jr69bd$gum$3@dough.gmane.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 6/11/2012 9:25 PM, Walter Hurry wrote:
> On Mon, 11 Jun 2012 19:10:21 -0700, Michael Sierchio wrote:
> 
>> Have you installed bash?  It's not in the system base.
>>
>> What's in your shell scripts?
> 
> Thanks for the quick response.
> 
> $ pkg_info|grep bash
> 
> bash-4.2.28         The GNU Project's Bourne Again SHell
> 
> $ which bash
> 
> /bin/bash
> 
> $ 
> 
> $ less $HOME/bin/exports.sh
> 
> #!/bin/bash
> 
> LOG=$HOME/log/exports.log
> 
> logger -t walterh-cronjob Exports started
> 
> echo Exports started at `date` > $LOG
> 
> rm $HOME/postgresql/*
> 
> psql packages -f $HOME/sql/exports.sql
> 
> cd $HOME/postgresql
> 
> tar cfz postgresql.tgz *
> 
> rm *csv
> 
> echo Exports finished at `date` >> $LOG
> 
> logger -t walterh-cronjob Exports finished
> 
> /home/walterh/bin/exports.sh (END)
> 
> _______________________________________________
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"
> 
> 
> 


I tend to use full path names in my shell scripts.
So for shits n giggles, try that.
Instead of tar cfz postgresql.tgz *
Try /bin/tar cfz postgresql.tgz *  etc, etc, etc

Use the paths for all commands such as rm, psql, logger etc.

-- 
Keep well,

Chris
 <><



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4FD6ADAA.1020402>