Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
.
google site



UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD.

Closed Thread
English Japanese Spanish French German Portuguese Italian Powered by Powered by Google
 
Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 03-06-2006
blowtorch's Avatar
AFK
 

Join Date: Dec 2004
Location: Singapore
Posts: 2,351
cron problem!

The cron daemon on one of my HP boxes is giving the following error:
Quote:
c queue max run limit reached <date>
! rescheduling a cron job <date>
I checked the queuedefs man page, and it has left me a bit confused. The man page says:
Quote:
njob
The maximum number of jobs that can be run simultaneously in that queue. Although any number can be specified here, the total number of jobs that can be run on all the queues is limited to 100.
So this means that no more than 100 cronjobs can be run at one time (we do not use at and batch on this system).

The /var/adm/cron/queuedefs file does not have a line for cron, so it should be picking up the default value. But in this post, Perderabo says that the default value is also 100. If that is the case, have I already reached the maximum? And if so, do I have any choice, other than having a cronjob that restarts cron every day or so?

-EDIT:
Here's the uname -a o/p:
HP-UX xxxxx B.11.11 U 9000/800
Sponsored Links
  #2 (permalink)  
Old 03-07-2006
RTM's Avatar
RTM RTM is offline Forum Advisor  
Registered User
 

Join Date: Apr 2002
Location: On my motorcycle
Posts: 3,061
Quote:
And if so, do I have any choice, other than having a cronjob that restarts cron every day or so?
Restarting cron every day or so isn't going to help - cron will just start getting up to the max again - it's all about scheduling and making sure your scripts end. On that other post I mentioned that I had never seen the issue (back in 2002) - well, the same DBA caused it to happen, opened up a Sev 1 ticket blaming the OS for his lousy code which never died - he ran the same script every minute without checking to see if the last one finished - he easily got up to 100 jobs running and the "c queue max run limit reached" message starting popping up.

You need to look at the scripts and scheduling of the cron jobs - make sure that there is a clean exit so you don't build up to 100 jobs. The system DOES reschedule - once the max of 100 jobs goes down, it will start running all the jobs waiting (unless it hits 100 again). It's actually a pretty good way of doing in in my opinion. Keeps my favorite DBA from killing the system every day!
  #3 (permalink)  
Old 03-07-2006
Perderabo's Avatar
Unix Daemon
 

Join Date: Aug 2001
Location: Ashburn, Virginia
Posts: 9,150
Look up the pid of the cron process. You will have 100 processes with that number as the ppid. This not a matter of a clean exit. They are still running.

Or maybe you have too much stuff in another queue? Notice the language on "man queuedefs": "the total number of jobs that can be run on all the queues is limited to 100". I have never really known whether or not to believe that sentence.
  #4 (permalink)  
Old 03-08-2006
blowtorch's Avatar
AFK
 

Join Date: Dec 2004
Location: Singapore
Posts: 2,351
Thanks for the inputs. We did move a few cronjobs around, and I added a line in the queuedefs file: c.100j2n60w. One question though: does a script count as one 'job'? So if I have 5 find commands running through cron and I put them in a single script, I will have reduced the number of jobs by 4 right?
  #5 (permalink)  
Old 03-08-2006
Perderabo's Avatar
Unix Daemon
 

Join Date: Aug 2001
Location: Ashburn, Virginia
Posts: 9,150
cron is waiting for its child process to finish. It doesn't matter what that child does including running other processes. Want to cheat? Write a cron script that launches a second script in the background and immediately exits.

#! /usr/bin/ksh
/path/to/real/script &
exit 0

I have never tried this, but I'm guessing it will fake cron out.
Sponsored Links
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
problem with cron job solne Solaris 7 01-18-2008 08:57 PM
Cron problem tez UNIX for Dummies Questions & Answers 3 10-27-2006 06:48 PM
Problem with cron jhansrod AIX 2 11-25-2005 04:30 PM
cron problem VPN UNIX for Dummies Questions & Answers 2 04-16-2004 07:27 AM
Cron Problem Raiden Shell Programming and Scripting 4 11-16-2003 07:00 AM



All times are GMT -4. The time now is 04:23 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2010. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0