title: expect script on crontab not works completely
body: <p>I am trying to write an expect script to telnet a machine and reboot it. When I run the script manually it works as expected</p>
  
  <p>But when I try to run it autoaticall on crontab it doesn't complete the process.</p>
  
  <p>The script is : </p>
  
  <pre><code>#!/usr/local/bin/expect
  spawn telnet 192.168.1.1
  expect "login:"
  send "root\r"
  expect "Password:"
  send "&lt;password&gt;\r"
  send "bash\r"
  send "cd /opt\r"
  send "reboot\r"
  interact
  </code></pre>
  
  <p>the output of the script ( when it is run by cron )</p>
  
  <pre><code>spawn telnet 192.168.1.1
  Trying 192.168.1.1...
  Connected to 192.168.1.1.
  Escape character is '^]'.
  DD-WRT v24-sp2 std (c) 2010 NewMedia-NET GmbH
  Release: 08/07/10 (SVN revision: 14896)
  RK-SWOT-2 login: root
  Password:
  </code></pre>
  
  <p>and that's it. no more go forward on the cron.
  Can you help me for this ?</p>