Pretty 'effing cool if you ask me. I will go over this later in the week with a fine toothed comb (i.e. my bash book) and make a little more sense of it and see if I come up with anything. Thanks for putting such time into it.
Thanks again. Sam p.s. I feel your pain. Being a problem solving wizard gets one drawn into all kinds of madness... ;) . I truly appreciate it though. |
No problem. If anything isn't clear, just holler.
I did edit it a little though; minor stuff that doesn't affect operation. I would have thrown in a "cleanup" mode, but the way the script works, there's very little chance (if any) that it would become zombied. If it does, then there's probably a bigger problem than email to worry about. If you'd like to add a cleanup-type of option to the script (as a tinkering exercise or if it becomes necessary), then I'd follow keefaz's lead: something simple like echoing the pid of the script to a file and then removing it on successful completion of the script. And I forgot to mention, the cron entries were just arbitrarily picked by me. If you wanted to maintain the once per two minutes routine, you could change them to: Code:
0-58/2 * * * * /path/to/script local first field: minute all other field: hour, day of month, month, day of week if given a range, (such as 1-5) then the command is executed on every matching field within the range (i.e. at minute 1, 2, 3, 4, and 5) If given a range followed by a slash, the number after the slash gives the "step" amount. An asterisk means match any value |
All times are GMT -5. The time now is 05:57 PM. |