Re: Shell Script Help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On Fri, Sep 6, 2013 at 8:44 AM, Nicolas Thierry-Mieg <
Nicolas.Thierry-Mieg@xxxxxxx> wrote:

> Matt wrote:
> > I have a script file in my cron.hourly that contains a good number of
> > scripts I must call.
> >
> > #!/bin/sh
> >
> > sleep 15
> > perl /scripts/create_graph.pl &
> >
> > sleep 15
> > perl /scripts/create_graph_out.pl &
> >
> > many more lines. etc.
> >
> > Is there a way I can sleep random length to time before executing each
> > but background each one so master script returns promptly.  Something
> > like.
>
> sleep 15 && perl /scripts/create_graph.pl &
> should return promptly, another reply addresses the random part.
>
>

 sleep $(($RANDOM%300))
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos




[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux