Re: xServes are dead ;-( / SAN Question

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



On 11/11/2010 03:45 PM, John R Pierce wrote:
> put the job in a loop like...
>
>      while true;  do
>           your stuff
>           sleep 60
>      done;

Sure, but you also need to start the loop and make sure it doesn't die. 
  You could use a script like this to repeat a script and then wait:

---
#!/bin/sh

delay="$1"
shift

"${@}"

at now +  "$delay" <<EOF
"$0" "$delay" "${@}"
EOF
---

Run "repeat.sh 5m /path/to/whatever -args".  The script will run that 
script and args, then schedule itself to run again in at.  The script 
takes care of both running the job you specify and inserting itself into 
the system's scheduler.
_______________________________________________
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