Howdy folks.
I'm on the final stages of this mirror setup.
I'm unsure of how to handle locking with cron - saw an app called lockcron, but I have a feelingg this isn't the way and the setup page recommends asking the list so..
How do I stop cron from overrunning? :)
-Geoff W.
On Thu, 14 Feb 2008, gw@geeklan.com wrote:
Howdy folks.
I'm on the final stages of this mirror setup.
I'm unsure of how to handle locking with cron - saw an app called lockcron, but I have a feelingg this isn't the way and the setup page recommends asking the list so..
How do I stop cron from overrunning? :)
For my mirror, I have cron run a script, which looks like this:
#!/bin/bash
### Lock file if [ -f /tmp/update-mirrors.lock ] then echo "Lock file exists" && exit 1 else date >> /tmp/update-mirrors.lock fi
### Do a bunch of stuff
### Remove lock file /bin/rm -rf /tmp/update-mirrors.lock
And then to /etc/rc.local I add
/bin/rm -rf /tmp/update-mirrors.lock >/dev/null 2>&1
(to make sure that if the box reboots during a run, the lock file will be removed).
DR
Attaching our script if anyone is interested in it.
- John 'Warthog9' Hawley
On Thu, 2008-02-14 at 21:10 -0700, gw@geeklan.com wrote:
Howdy folks.
I'm on the final stages of this mirror setup.
I'm unsure of how to handle locking with cron - saw an app called lockcron, but I have a feelingg this isn't the way and the setup page recommends asking the list so..
How do I stop cron from overrunning? :)
-Geoff W. _______________________________________________ CentOS-mirror mailing list CentOS-mirror@centos.org http://lists.centos.org/mailman/listinfo/centos-mirror