Score:0

vcsa 6.7 Scheduled task fails, but runs fine when triggered manually

ru flag

under VCSA 6.7, I have scheduled one bash script to run every minute. This script cleanup some tables in the db. when I run the script manually, or if I run the cmd mentioned in the script , it works fine,

but via cron, I am getting following mail for root.

Following error appears on mail root.

psql.bin: could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/tmp/.s.PGSQL.5432"?

cat dbcleanup.sh

#!/bin/sh /opt/vmware/vpostgres/current/bin/psql -d VCDB postgres -f /root/dbcleanup.sql echo db process start > /var/log/test.log

Crontab Entry:

*/1 * * * * /root/dbcleanup.sh

I can see that bash script is running as it adds the text in test.log file. but psql.bin error. I m lost here.

Kindly advise.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.