Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

I want to do what I hope is a simple thing to make my clients' job simpler.

For example, let's say I have 4 scripts: script1 on domain1, and script2-script4 on domain2.

I want to have three scripts that do the following, in ORDER:

scripta: run script1, run script2, run script4
scriptb: run script1, run script3, run script4
scriptaANDb: run script1, run script 2, run script3, run script4

There is no need to pass data to/from, just run the scripts needed.

Thank you all so much for any help you can provide.
  • Comment on Running Several Scripts on Different Hosts

Replies are listed 'Best First'.
Re: Running Several Scripts on Different Hosts
by sauoq (Abbot) on Dec 19, 2002 at 20:58 UTC

    scripta:

    #!/bin/sh ssh user@host1.example.com script1 ssh user@host2.example.com 'script2;script3;script4'

    The other scripts might be done similarly. You may need or want to use full pathnames for the scripts. You may need or want to use a .shosts file or run an ssh agent for authentication.

    -sauoq
    "My two cents aren't worth a dime.";
    
Re: Running Several Scripts on Different Hosts
by Marza (Vicar) on Dec 19, 2002 at 21:21 UTC

    This is more System Administration then perl.

    There are many ways to do this.

    For one thing the domains must have a trust going. If they can't, then you have to have copies on both domains.

    I would have the scripts in a central repository that is shared. Then you can use the task scheduler to run your scripts.

    This is assuming we are talking W2K since you mention domains.

Re: Running Several Scripts on Different Hosts
by metadatum (Scribe) on Dec 19, 2002 at 20:42 UTC
    cron?