Thread: vacuumdb and pg_dump are not running under cron

vacuumdb and pg_dump are not running under cron

From
"Jeff Lu"
Date:
 
Hi,
 
I set up a cron job to run vacuumdb and pg_dump periodically but they are not being run under cron.  Under command line they worked fine.
 
At first I thought the cron didn't get executed at all so I added shutdown to in my cron file:
 
9 12 * * * vacuumdb --username=jeff -h localhost jeffdb
9 12 * * * pg_dump --username=jeff jeffdb
> /c/progra~1/apache~1/apache/intrapos/database/intrapos_shdw.dat
9 12 * * * pg_ctl stop -m fast
9 12 * * * shutdown --force --shutdown 10
 
The system got shutdown but the database didn't get stopped, vaccumdb and pg_dump did not get executed
 
Can someone tell me why that is?
 
Thank you
-Jeff