PDA

View Full Version : How to automate Fedora Machine Restart?



litter
3rd August 2007, 08:45 AM
I had written a script under /etc/rc.local to VACUUM my postgresql everyday.

I found that this script have to reboot the machine then only it work.

So how can i restart the machine automatically by script or others way to automate the Vacuum without reboot the machine. PLEASE HELP ME !!!! :(

linuxidb
3rd August 2007, 10:26 AM
Hi

You could try stopping and starting postgresql at the end of the script

/etc/rc.d/init.d/postgresql stop
then
/etc/rc.d/init.d/postgresql start

:)

kurzer
3rd August 2007, 10:30 AM
you could run your script as a cron job, then you do not have to reboot your machine. Try to search for cron or crontab in google; there are some good how-to's around