in reply to Expect doesn't wait for an EOF with crontab

My suspicion is that your usage of STDIN is the issue here. Some versions of cron open it to /dev/null, others don't supply a valid fd 0 at all. In any case, who or what is supposed to close it in order for Expect to detect an EOF at the appropriate time?

Maybe you can make Expect wait for some msg/string in the command's output which would indicate that $command has finished.  Just an idea...