Hi all.
I have created a bash script, that calls a expect script, but the expect script does not get called through the bash script called from crontab.
The error i get is
From: crisitanambk@dhcp-dev-176.DOMAIN (Cron Daemon)
To: crisitanambk@dhcp-dev-176.DOMAIN
Subject: Cron <crisitanambk@dhcp-dev-176> /Users/crisitanambk/startUpScripts/Level3ShareScript
X-Cron-Env: <SHELL=/bin/sh>
X-Cron-Env: <PATH=/usr/bin:/bin>
X-Cron-Env: <LOGNAME=crisitanambk>
X-Cron-Env: <USER=crisitanambk>
X-Cron-Env: <HOME=/Users/crisitanambk>
Message-Id: <20111018120800.A31B23299DC@dhcp-dev-176.dev.2m.dk>
Date: Tue, 18 Oct 2011 14:08:00 +0200 (CEST)
spawn mount -t smbfs //ch@fileserver/Level3/ /Users/crisitanambk/Level3Share/
couldn't execute "": no such file or directory
while executing
"spawn mount -t smbfs //ch@fileserver/Level3/ /Users/crisitanambk/Level3Share/"
(file "./Level3ExpectScript" line 7)
But it says that no such file or directory exists???
But if i execute the Level3ShareScript by ./Level3ShareScript then it works no problem.
My expect script looks like
#!/usr/bin/expect -f
spawn mount -t smbfs //ch@fileserver/Level3/ /Users/crisitanambk/Level3Share/
expect "Password:"
send "MyPassword\r"
wait
Also in my expect script how can i set the X-Cron-Env: <SHELL=/usr/bin/expect> or X-Cron-Env: <SHELL=/bin/csh>??
How do i solve this?
Kind regards.
I have created a bash script, that calls a expect script, but the expect script does not get called through the bash script called from crontab.
The error i get is
From: crisitanambk@dhcp-dev-176.DOMAIN (Cron Daemon)
To: crisitanambk@dhcp-dev-176.DOMAIN
Subject: Cron <crisitanambk@dhcp-dev-176> /Users/crisitanambk/startUpScripts/Level3ShareScript
X-Cron-Env: <SHELL=/bin/sh>
X-Cron-Env: <PATH=/usr/bin:/bin>
X-Cron-Env: <LOGNAME=crisitanambk>
X-Cron-Env: <USER=crisitanambk>
X-Cron-Env: <HOME=/Users/crisitanambk>
Message-Id: <20111018120800.A31B23299DC@dhcp-dev-176.dev.2m.dk>
Date: Tue, 18 Oct 2011 14:08:00 +0200 (CEST)
spawn mount -t smbfs //ch@fileserver/Level3/ /Users/crisitanambk/Level3Share/
couldn't execute "": no such file or directory
while executing
"spawn mount -t smbfs //ch@fileserver/Level3/ /Users/crisitanambk/Level3Share/"
(file "./Level3ExpectScript" line 7)
But it says that no such file or directory exists???
But if i execute the Level3ShareScript by ./Level3ShareScript then it works no problem.
My expect script looks like
#!/usr/bin/expect -f
spawn mount -t smbfs //ch@fileserver/Level3/ /Users/crisitanambk/Level3Share/
expect "Password:"
send "MyPassword\r"
wait
Also in my expect script how can i set the X-Cron-Env: <SHELL=/usr/bin/expect> or X-Cron-Env: <SHELL=/bin/csh>??
How do i solve this?
Kind regards.
Last edited: