labbots / google-drive-upload

Bash scripts to upload files to google drive
https://labbots.github.io/google-drive-upload/
MIT License
698 stars 145 forks source link

Files are not uploaded to Google Drive if gupload is executed from cron [FIXED] #196

Open demodoo opened 1 year ago

demodoo commented 1 year ago

When i execute the command gupload /home/ubuntu/odoo15/develop/backup/ -c odoo_backup -d from the shell everything works fine. Files are uploaded to my Google drive folder. But when I schedule the same command in cron, files are not uploaded. Cron executes the command but files are not uploaded.

Crontab entry: 00 14 * gupload /home/ubuntu/odoo15/develop/backup/ -c odoo_backup -d


[EDIT] Using absolute path to gupload fix the problem: 00 14 * /home/ubuntu/.google-drive-upload/bin/gupload /home/ubuntu/odoo15/develop/backup/ -c odoo_backup -d