Newbie question: Why aren't my cron jobs running?

Chris racerx at makeworld.com
Tue Jun 12 02:56:02 UTC 2012


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 at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe at 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
 <><


More information about the freebsd-questions mailing list