Challenging script (for me at least!) Calling all scripters!
I need to make a cronjob do the following:
The reason I need to do this is because the remote machine is a tape backup machine that has many running jobs on it. Towards the end of the week I need to start pulling tapes as soon as the last job is finished. Time is of the essence because there can be hundreds of tapes some weeks. What I do now is simply telnet to the machine, run the command and see if the jobs are finished. I would just like to automate that process. |
can't you set the remote machine to tell you when it's finished all jobs ?
|
I think that's what I'm trying to do, no?
|
Quote:
You want to :
I'm suggesting : remote computer emails you when it's finished all jobs. No telnet, no executing commands, no printing to files. Surely the remote machine has some capabilities itself ? |
That would be one solution. However, the solution I'm asking is the one I would prefer.
|
Quote:
|
Quote:
|
Quote:
Check out expect, You can write a small expect script to open the telnet session, run your command give you the output, then logout of the telnet session. Then you can process the information in a bash script. This link has expect examples for running a telnet session. http://www.osix.net/modules/article/?id=30 last, if you know perl you could do all this in one perl script. |
Quote:
|
All times are GMT -5. The time now is 04:15 PM. |