Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 07-08-2004, 02:19 PM   #16
Registered: Aug 2003
Posts: 41

Original Poster
Rep: Reputation: 15

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.


p.s. I feel your pain. Being a problem solving wizard gets one drawn into all kinds of madness... . I truly appreciate it though.
Old 07-08-2004, 03:24 PM   #17
Senior Member
Registered: Jan 2003
Posts: 2,786

Rep: Reputation: 372Reputation: 372Reputation: 372Reputation: 372
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:
0-58/2 * * * * /path/to/script local
1-59/2 * * * * /path/to/script external
That'll do the same thing as previously: stagger the scripts so only one runs at a time. "local" executes on every even minute of the hour, and "external" executes on every odd minute of the hour. If the format is a little unclear, here's the Cliff's Notes version (man 5 crontab for gory details):

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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
System Resources RySk8er30 Mandriva 2 06-23-2005 06:23 PM
java /proc (getting system resources) jinics Programming 1 08-26-2004 05:55 AM
System resources... manofwax Linux - Hardware 2 07-23-2004 08:34 PM
konsole system resources? lectraplayer Linux - Newbie 2 02-07-2004 05:14 PM
Nano using 90% system resources mooreted Linux - Software 2 11-27-2003 01:59 PM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 06:12 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration