[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Expect script does not work on crontab



>> On Tue, 13 Mar 2012 13:59:35 +0530, 
>> Bilal mk <bilalhifx@gmail.com> said:

B> The following script is working fine executing from shell. But does not
B> work running on crontab.  How to fix this crontab issue?
B>   #!/usr/bin/expect
B>   spawn /usr/bin/rsync -avz --delete /var/app/ user@somedomain:/var/app/
B>   expect "Password:"
B>   send "somepassword\r"
B>   interact

   I believe the "interact" line is messing you up; when "expect" sees that,
   it wants a terminal or PTY to play with, and cron doesn't give it one.

-- 
Karl Vogel                      I don't speak for the USAF or my company

I smile because I don't know what's going on.    --bumper sticker


Reply to: