I think is better to understand what is the task to be executed on the remote machine, because may exist much better solution that telnet And using SSH will be much sample to maintain and is more secure (no plain text passwords in script and over the network)
Regards: Romeo Ninov -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Carsten Aulbert Sent: Thursday, April 29, 2010 7:56 AM To: [email protected] Subject: Re: [Solaris-Users] How to schedule for a repeated task? Hi On Thursday 29 April 2010 06:47:55 hadi motamedi wrote: > I need to schedule for a repeated task, as the followings: > -) Telnet to a remote node > -) Issue a command > -) Capture the output in a log > -) Logout from Telnet > -) Wait for a prescribed time interval > -) Then redo , but append the subsequent output in just on file > Can you please let me know which options do we have to write such a task? My take would be to use "expect" to do the telnet business, the output of the script you could then simply collect on the host (along with some telnet stuff, but parsing that should be easy), i.e. something like while true; do /path/to/my/expect/script >> output sleep 500 done simple expect script looks like http://www.osix.net/modules/article/?id=30 HTH Carsten _______________________________________________ Solaris-Users mailing list [email protected] http://www.filibeto.org/mailman/listinfo/solaris-users __________ Information from ESET NOD32 Antivirus, version of virus signature database 5070 (20100428) __________ The message was checked by ESET NOD32 Antivirus. http://www.eset.com __________ Information from ESET NOD32 Antivirus, version of virus signature database 5070 (20100428) __________ The message was checked by ESET NOD32 Antivirus. http://www.eset.com _______________________________________________ Solaris-Users mailing list [email protected] http://www.filibeto.org/mailman/listinfo/solaris-users
