Jump to content

[Solved] Running psql from cron job is failing


systemcr

Recommended Posts

Hi everyone,

 

As I explained in a former post, I'd like to schedule a cron job to run an SQL script on my PostgreSQL database for maintenance stuff.

 

The thing is that I am receiving this error when the cron job is being executed (see image attached).

 

Could anyone help me please?

 

Thanks in advance!

 

 

Screenshot-1.png

Edited by systemcr
Link to comment
Share on other sites

I’m not sure if this is possible or not. I suspect a permission issue would be the cause if it’s not.

 

I’ll pass this to Krydos, but is there a reason you can’t just run the sql queries in a php script or something and call the script from the cron? That’s what I do for database maintenance on my systems (though I use MySQL).

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...