0
I’m trying to create a cronjob executing the following command
sudo sh /usr/local/bin/send_site_backup_files_to_dropbox.sh |
ts "[%Y-%m-%d %H:%M:%S]" 2>&1 |
tee /var/log/send_backups_to_dropbox.log |
mailx -s "Report for Vesta backup files sent to Dropbox" [email protected]`
The command executes a script that uploads backups from my server to my folder on Dropbox. It works perfectly when I run it by Putty. But when it runs via cronjob it is returned to my email the following error:
/bin/sh: -c: line 0: unexpected EOF while looking for matching `"' /bin/sh: -c: line 1: syntax error: unexpected end of file
Without that part ts "[%Y-%m-%d %H:%M:%S]" 2>&1
it works, so the problem is there.
Thank you very much, the second alternative was the one that worked. In the first one still presents the same error.
– Joao Victor Menom