Rsync work on ssh but not on cron

Hello,
I have diifficulties, where I have ssh command as follows:

sshpass -p “myPassword” rsync --update --delete -vaz --progress /home/some_user/web/ root@some_ip_address:/home/someuser/web/

Rsync command above works on ssh. But not on cron.
And here is the error log:
sent 0 bytes received 0 bytes total size 0
rsync error: unexplained error (code 255) at rsync.c(713) [sender=3.2.7]

Can someone help me with this issue? Big thank’s in advance

Anyway, I don’t know what that error means but if you are using cron, always use the full path to commands, enclose the password in single quotes and just in case, add ssh option StrictHostKeyChecking=accept-new’. Also, if you are not running the command interactively, maybe the –progress option is not a good idea.

/usr/bin/sshpass -p 'myPassword' /usr/bin/rsync --update --delete -vaz -e 'ssh -o StrictHostKeyChecking=accept-new' /home/some_user/web/ root@some_ip_address:/home/someuser/web/

 

https://forum.hestiacp.com/t/rsync-work-on-ssh-but-not-on-cron/15846/2