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.

Tahnk you in advance.

Best Regards
-- Csaba


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.501 / Virus Database: 299 - Release Date: 2003. 07. 14.



-- 
redhat-list mailing list
unsubscribe mailto:[EMAIL PROTECTED]
https://www.redhat.com/mailman/listinfo/redhat-list

Reply via email to