I have a script which dumps out database and uploads the SQL file to Swift. I've run into the issue where the script runs fine in terminal but fails in cron.
A bit of debugging and I found that the
/usr/local/bin/swift
command is not found in the script.
Here's my crontab entry:
*/2 * * * * . /etc/profile; bash /var/lib/postgresql/scripts/backup
Here's what I've tried:
1. Using full path to swift
as /usr/local/bin/swift
2. Executing the /etc/profile
script before executing the bash script.
How do I solve this?
Asked by An SO User
(263 rep)
Aug 8, 2017, 11:50 AM
Last activity: Aug 11, 2024, 09:52 AM
Last activity: Aug 11, 2024, 09:52 AM