Re: Crontab and jobs
Gerard Samuel wrote: #!/bin/sh # # To back up PostgreSQL database # date=`date '+%Y%m%d-%H%M%S'` pg_dump -cO -U user database > /root/db_back/pgsql-$date.sql You probably need the full path to pg_dump. The crontab environment doesn't have a lot of the settings you get in a login shell. Ceri Davies wrote: On Fri, Jan 17, 2003 at 05:35:47PM -0500, Gerard Samuel wrote: Im trying to setup a cron job to back up my db. If I manually execute the script it works fine, but the cron job isn't executing the job. ## Backup PostgreSQL database */1* * * * /root/bin/pgsql-back 2> /dev/null > /dev/null Anyone notice anything with this crontab entry??? Show us the script. It's probably your path. Ceri -- Bill Moran Potential Technologies http://www.potentialtech.com To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-questions" in the body of the message
Re: Crontab and jobs
Thanks to James and Ceri. Use the full path to pg_dump -> /usr/local/bin/pg_dump Works now. Gerard Samuel wrote: #!/bin/sh # # To back up PostgreSQL database # date=`date '+%Y%m%d-%H%M%S'` pg_dump -cO -U user database > /root/db_back/pgsql-$date.sql Ceri Davies wrote: On Fri, Jan 17, 2003 at 05:35:47PM -0500, Gerard Samuel wrote: Im trying to setup a cron job to back up my db. If I manually execute the script it works fine, but the cron job isn't executing the job. ## Backup PostgreSQL database */1* * * * /root/bin/pgsql-back 2> /dev/null > /dev/null Anyone notice anything with this crontab entry??? Show us the script. It's probably your path. Ceri -- Gerard Samuel http://www.trini0.org:81/ http://dev.trini0.org:81/ To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-questions" in the body of the message
Re: Crontab and jobs
#!/bin/sh # # To back up PostgreSQL database # date=`date '+%Y%m%d-%H%M%S'` pg_dump -cO -U user database > /root/db_back/pgsql-$date.sql Ceri Davies wrote: On Fri, Jan 17, 2003 at 05:35:47PM -0500, Gerard Samuel wrote: Im trying to setup a cron job to back up my db. If I manually execute the script it works fine, but the cron job isn't executing the job. ## Backup PostgreSQL database */1* * * * /root/bin/pgsql-back2> /dev/null > /dev/null Anyone notice anything with this crontab entry??? Show us the script. It's probably your path. Ceri -- Gerard Samuel http://www.trini0.org:81/ http://dev.trini0.org:81/ To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-questions" in the body of the message
Re: Crontab and jobs
On Fri, Jan 17, 2003 at 05:35:47PM -0500, Gerard Samuel wrote: > Im trying to setup a cron job to back up my db. > If I manually execute the script it works fine, but the cron job isn't > executing the job. > > ## Backup PostgreSQL database > */1* * * * /root/bin/pgsql-back2> > /dev/null > /dev/null > > Anyone notice anything with this crontab entry??? Show us the script. It's probably your path. Ceri -- Remember the tome of the brethren! To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-questions" in the body of the message