Re: Shell Script Help

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



On Thu, Sep 05, 2013 at 10:24:55AM -0500, 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.

Don't background them individually; background the whole lot

#!/bin/sh
(
  perl /scripts/create_graph.pl
  perl /scripts/create_graph_out.pl
  etc
) &

Now they will run one after another and you don't need to sleep
between them.


-- 

rgds
Stephen
_______________________________________________
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