rsync hangs in cron (not SSH-problem)

Tim Conway conway at
Thu Jun 3 13:26:42 GMT 2004

I would suggest that you put those commandlines into scripts, and redirect 
stdout, stderr, AND stdin - "rsync -av --delete /mnt/web1 /mass/kuurne/day 
</dev/null >logfile 2>&1", for instance, or if you're wanting it just 
mailed like cron will do, "rsync -av --delete /mnt/web1 /mass/kuurne/day 
</dev/null  2>&1 |mail $USER"... though I'd do a file, send(see next 
At one time, on some systems, rsync run from cron detected stdin as a 
socket and behaved as if it were called from inetd as an rsyncd.  Plainly, 
your problem isn't as simple as that, as all three necessary processes for 
a normal local sync are coming up, but eliminating unknowns in the 
filehandles it gets is a good idea.

Tim Conway
Unix System Administration
Contractor - IBM Global Services
conway at

>>When used this command in cron
>>00 01 * * * rsync -av --delete /mnt/web1 /mass/kuurne/day
>>00 02 * * * rsync -av --delete /mnt/web2 /mass/kuurne/day

More information about the rsync mailing list