Montfort
03-20-02, 14:05
| I need to know how to get the results of a query into text file,on regular basis using a cron scrpit? any suggestions? |
View Full Version : cron jobs for views in postgresql
| I need to know how to get the results of a query into text file,on regular basis using a cron scrpit? any suggestions? |
| Of couse, check man crontab, this command line program allows the program schedule task. Only made a bash script saving the postgres envionment and you can run whatever postgres command. BTW, if you want to save sql result into text file, you could run something like: psql mydb <<! select * from pg_user ! > file.txt 2> error.log or echo "select * from pg_user" | psql mydb > file.txt 2> error.log Salu lulu. Originally posted by MaleMan is it possible to use cron for making database backup and vaccum? can u guys give me some hints and tips... or u can show me the details if u want... :D |