On Thu, 2003-07-17 at 08:09, Együd Csaba wrote: > Hi All, > I have a problem with a crontab job. > > My shell script which I want to run every day is the following: > ---------------------------------------------------------------------------- > ------------------ > $ cat alumil_daily.sh > #!/bin/bash > echo "Daily VACUUM ..." | gzip >> /home/alumil/vdblog.gz > echo `date` | gzip >> /home/alumil/vdblog.gz > vacuumdb --dbname alumil --analyze --quiet > /dev/null 2>&1 > echo `date` | gzip >> /home/alumil/vdblog.gz > echo "done." | gzip >> /home/alumil/vdblog.gz > echo "" | gzip >> /home/alumil/vdblog.gz > > pg_dump -c alumil | gzip -c > /var/ftp/pub/`date +"%Y_%m_%d_%H_%M_%S"`.gz > > echo "Reindex ..." | gzip >> /home/alumil/vdblog.gz > echo `date` | gzip >> /home/alumil/vdblog.gz > psql -f reindex_db.query alumil > /dev/null 2>&1 > echo `date` | gzip >> /home/alumil/vdblog.gz > echo "done." | gzip >> /home/alumil/vdblog.gz > ---------------------------------------------------------------------------- > ------------------ > > My crontab settings are the following (it starts at the required time) > ---------------------------------------------------------------------------- > ------------------ > SHELL=/bin/sh > * * * * * /home/alumil/alumil_daily.sh > ---------------------------------------------------------------------------- > ------------------ > > When I run alumil_daily.sh from command line it creates the output file > properly. > Running it from crontab the generated output file is empty, as if the > database dump program > would not provide any output. > > What can be the problem. > Every time I have had a probelm like this it ended up being a path problem. Use fully qualified paths to all progs or set a PATH variable in your script.
Bret -- redhat-list mailing list unsubscribe mailto:[EMAIL PROTECTED] https://www.redhat.com/mailman/listinfo/redhat-list