VDS Sphera Knowledge Base

Main / Browse Categories / PostgreSQL / How can I reload PostgreSQL thru a cron job?

Print article Print Article    Email article Email Article

How can I reload PostgreSQL thru a cron job?
Create a bash script here:
/usr/local/pgsql/restart_db.sh
chmod the file with 755 permissions
chmod 755 /usr/local/pgsql/restart_db.sh
Add this code to the file:
#!/bin/sh
/etc/rc.d/init.d/pg_ctl restart
exit 0
Here is a sample cron entry that would do the job:
45 0 * * * /usr/local/pgsql/restart_db.sh >> /dev/null 2>&1

If you are not familiar with how cron works inside your VDS, please refer to this article:
http://help.hardhathosting.com/question.php/55

User Comments
How can I reload PostgreSQL thru a cron job?  
There are no user comments for this topic.
 

Attachments
No attachments.

Related Articles
 Does PostgreSQL have a graphical user interface?
 How can I connect to PostgreSQL using PHP?
 What version of PostgreSQL are you running?
 Where can I find answers to frequently asked questions on PostgreSQL?
 Where can I find Technical Documentation on PostgreSQL?

Why Choose Our Hosting?

  • Unmatched Customer Support!
  • Virtual Private Server technology provides a rich, dedicated-like environment for every account.
  • We are known for our superb quality, performance and flexible hosting environment. We manage the server, software, and network you do the rest.
Continue reading »

Featured Hosting Plan


Learn more about our VPS Extreme

What is Included?

  • PHP 5/MySQL 5
  • Parallels® Plesk Panel 10
  • Unique IP Address
  • Daily VPS Backups (Off Server)
  • SAS Hardware Raid diskspace
  • CentOS 5 x86_64 bit
  • Multi-homed Tier 1 Bandwidth
  • Full Upgrade capabilities
Continue reading »