[CentOS] How to schedule for a repeated task?

Les Mikesell lesmikesell at gmail.com
Sat May 1 14:52:48 UTC 2010


hadi motamedi wrote:
> Dear All
> I need to schedule for a repeated task on my CentOS server, 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?
> Thank you

If the remote end of this is some dumb device that can only do telnet, use 
expect, kermit, or perl's Net::Telnet module to chat with it.  If it is another 
computer, set up ssh keys and just run remote commands directly.  And use cron 
to schedule the runs.

-- 
   Les Mikesell
    lesmikesell at gmail.com



More information about the CentOS mailing list