LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
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.

Notices


Reply
  Search this Thread
Old 07-08-2004, 02:19 PM   #16
dehuszar
Member
 
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.

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.
 
Old 07-08-2004, 03:24 PM   #17
Dark_Helmet
Senior Member
 
Registered: Jan 2003
Posts: 2,786

Rep: Reputation: 374Reputation: 374Reputation: 374Reputation: 374
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
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
 
  


Reply



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

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 01:49 AM.

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