Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
foreach hst $iplist {
spawn -noecho telnet $hst
expect {
-re "$loginprompt" {
send "$loginname\r"
expect -re "$pwprompt" {
send "$pw\r"
expect -re "$prompt" {
send "$croncmd\r"
expect -re "$vitab" {
send "$cmd1\r $cronstring\r"
send "$cmd2\r"
send_user "$expect_out(buffer)\n"
close $spawn_id ; wait
}
}
}
}
eof {do_diagnostics $spawn_id}
timeout {do_downhost $spawn_id}
}
}
#!/bin/ksh
# This defines the new crontab entry you want to add
export NEWENTRY='0 1 * * * /somedir/somescript > /somedir/somelog.log 2>&1'
export TMPFILE=/tmp/crontab.tmp.$$
crontab -l > ${TMPFILE}
print "${NEWENTRY}" >> ${TMPFILE}
crontab ${TMPFILE}
rm ${TMPFILE}
#!/bin/ksh
while read HOST
do
print "Working on ${HOST}"
rcp addcron.ksh ${HOST}:addcron.ksh
rsh ${HOST} ./addcron.ksh
done < hostnames.txt > addcron.log 2>&1