VDS Sphera Knowledge Base
| Main / Browse Categories / PostgreSQL / How can I reload PostgreSQL thru a cron job? |
How can I reload PostgreSQL thru a cron job?
Create a bash script here:
/usr/local/pgsql/restart_db.shchmod the file with 755 permissions chmod 755 /usr/local/pgsql/restart_db.shAdd this code to the file: #!/bin/sh /etc/rc.d/init.d/pg_ctl restart exit 0Here 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:
User Comments
|
||||||||
Attachments
| No attachments. |
Related Articles


