Crontab do not run on PM hours


 
Thread Tools Search this Thread
Operating Systems HP-UX Crontab do not run on PM hours
# 29  
Old 04-16-2012
Quote:
c queue max run limit
The following are the alphabet codes for the queue types:
Code:
a           For "at" jobs
b           For "batch" jobs
c           For "crontab" jobs

I think you need to add a c queue line in the queuedefs file, not change the a queue line. Be careful because the default is already 100 concurrent jobs. That is a lot of concurrent jobs so we do wonder what is happening in the other crontabs ?
# 30  
Old 04-16-2012
you could be right, because, the problem went away for a while only. Is back, I am having issues
Code:
tail /var/adm/cron/log
! c queue max run limit reached Mon Apr 16 13:51:00 SAST 2012
! rescheduling a cron job Mon Apr 16 13:51:00 SAST 2012
! c queue max run limit reached Mon Apr 16 13:51:00 SAST 2012
! rescheduling a cron job Mon Apr 16 13:51:00 SAST 2012
! c queue max run limit reached Mon Apr 16 13:51:01 SAST 2012
! rescheduling a cron job Mon Apr 16 13:51:01 SAST 2012
! c queue max run limit reached Mon Apr 16 13:51:01 SAST 2012
! rescheduling a cron job Mon Apr 16 13:51:01 SAST 2012
! c queue max run limit reached Mon Apr 16 13:51:01 SAST 2012
! rescheduling a cron job Mon Apr 16 13:51:01 SAST 2012

and cronjobs entries are not being runned
# 31  
Old 04-16-2012
The letter c at the start of the error message shows you that it is the c (crontab) queue.
(I had one yesterday for the a queue after a script containing at jobs went wrong).

I repeat that over 100 concurrent crontab jobs is worrying. Perhaps one of your other crontab files is faulty?
# 32  
Old 04-16-2012
or may be is the fact that I do not have an entry for
Code:
c

in the
Code:
more /var/adm/cron/queuedefs

Code:
mceldev[513]/tmp/fr #more /var/adm/cron/queuedefs
a.30j1n
b.2j2n90w
mceldev[514]/tmp/fr #

So shall I insert a c entry on the queuedefs file?

FR
# 33  
Old 04-16-2012
Check what's being ran inside those 100 concurrent jobs.

Are you really running 100 jobs concurrent jobs ?
Are they finishing properly ?

If all above is correct then increase concurrent jobs limit, unless you want the same to happen with 200 (or any) limit in future time Smilie

It's likely that some of that jobs are not exiting or hanging, occupying the one of the cron job slots forever ( until cron or machine is restarted/rebooted )
These 2 Users Gave Thanks to Peasant For This Post:
# 34  
Old 04-16-2012
Peasant makes a vary good point.
My approach would be to look at every process in memory and account for each process, looking for processes which should not be there at that time of day. Particularly if there are lots of the same process which came from a crontab line which are still there long after they should have finished.
Code:
ps -ef | sort +8 | pg

The classic problem is where cron jobs connect to a remote database but never disconnect.
This User Gave Thanks to methyl For This Post:
# 35  
Old 04-17-2012
Crontab do not run on PM hours

I am not having 100 crontab entries. there are 17 entries, 10 for root and 7 for a user.

What is intriguing is after I changed the line a.10j1n to a.30j1n, the entries in the cron, runned, BUT I beleive by changing "a" should not make a difference, only if I changed the line "c" for crontab, it should do something, but on my queuedefs file there is not a "c" line.

Code:
#ps -ef | sort +8 | pg
     UID   PID  PPID  C    STIME TTY       TIME COMMAND
    root 18662  3370  0 07:54:56 ?         0:00 <defunct>
    root 18671 18666  0 07:55:37 pts/3     0:00 -sh
    root 18687 18671  0 07:55:40 pts/3     0:00 pg
    root 27814     1  0 14:21:46 ?         0:00 /usr/sbin/cron
  ora10g 18665     1  0 07:55:25 ?         0:00 ora_q000_bscsprod
  ora10g 18669     1  0 07:55:31 ?         0:00 ora_q001_bscsprod
  report 27726 19770  0 14:18:48 pts/1     0:00 -su
  ora10g 10002     1  0 23:34:31 ?         0:00 oraclebscsprod (LOCAL=NO)
  ora10g 10004     1  0 23:34:31 ?         0:00 oraclebscsprod (LOCAL=NO)
  ora10g 10006     1  0 23:34:31 ?         0:00 oraclebscsprod (LOCAL=NO)
  ora10g 10008     1  0 23:34:31 ?         0:00 oraclebscsprod (LOCAL=NO)
  ora10g 10010     1  0 23:34:31 ?         0:00 oraclebscsprod (LOCAL=NO)
  ora10g 10012     1  0 23:34:31 ?         0:00 oraclebscsprod (LOCAL=NO)
  ora10g 10014     1  0 23:34:31 ?         0:00 oraclebscsprod (LOCAL=NO)
  ora10g 10016     1  0 23:34:31 ?         0:00 oraclebscsprod (LOCAL=NO)
  ora10g 10018     1  0 23:34:31 ?         0:00 oraclebscsprod (LOCAL=NO)
  ora10g 18646     1  0 07:52:22 ?         0:00 oraclebscsprod (LOCAL=NO)
  ora10g 18648     1  0 07:52:22 ?         0:00 oraclebscsprod (LOCAL=NO)
    root 18686 18671  0 07:55:40 pts/3     0:00 sort +8
    root 20895     1  0 09:10:00 ?         0:00 sh -c /usr/sbin/ping 192.168.0.85 | while read pong; do echo "$(date): $pong"; done > /tmp/fr/ping_date.txt
    root 22193     1  0 10:00:00 ?         0:00 sh -c /usr/sbin/ping 192.168.0.85 | while read pong; do echo "$(date): $pong"; done > /tmp/fr/ping_date.txt
    root 22290     1  0 10:01:00 ?         0:00 sh -c /usr/sbin/ping 192.168.0.85 | while read pong; do echo "$(date): $pong"; done > /tmp/fr/ping_date.txt
    root 22303     1  0 10:02:00 ?         0:00 sh -c /usr/sbin/ping 192.168.0.85 | while read pong; do echo "$(date): $pong"; done > /tmp/fr/ping_date.txt
    root 22320     1  0 10:03:00 ?         0:00 sh -c /usr/sbin/ping 192.168.0.85 | while read pong; do echo "$(date): $pong"; done > /tmp/fr/ping_date.txt
    root 22350     1  0 10:04:00 ?         0:00 sh -c /usr/sbin/ping 192.168.0.85 | while read pong; do echo "$(date): $pong"; done > /tmp/fr/ping_date.txt
    root 22406     1  0 10:05:00 ?         0:00 sh -c /usr/sbin/ping 192.168.0.85 | while read pong; do echo "$(date): $pong"; done > /tmp/fr/ping_date.txt

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Run a command once in three hours

Hi All, I have a bash script which is scheduled to run for every 20 minutes. Inside the bash script, one command which I am using need to be triggered only once in two or three hours.Is there anyway to achieve this. For example, if then echo "hi" else echo "Hello" UNIX Command---once... (5 Replies)
Discussion started by: ginrkf
5 Replies

2. Shell Programming and Scripting

Help 'speeding' up this 'parsing' script - taking 24+ hours to run

Hi, I've written a ksh script that read a file and parse/filter/format each line. The script runs as expected but it runs for 24+ hours for a file that has 2million lines. And sometimes, the input file has 10million lines which means it can be running for more than 2 days and still not finish.... (9 Replies)
Discussion started by: newbie_01
9 Replies

3. Shell Programming and Scripting

Can't get my crontab to run

I'm trying to get a crontab to run, every Friday at 11am and the problem is that it isn't running at all. 0 11 * * 6 /Users/martinb/Documents/SYSADMIN/Regular-Scripts/Info-And-Backups.sh Here's a link to a screenshot of my script (I've censored my email address). Screen Shot 2017 11 03... (3 Replies)
Discussion started by: $shell_Learner
3 Replies

4. Solaris

How to run cron entry every 5 min during office hours only?

Hi I need to setuop a cron entry to run every 5 min, only in office hours (between 8:00AM to 18:00PM, I did the following: 0,5,10,15,20,25,30,35,40,45,50,55 8,9,10,11,12,13,14,15,16,17,18 * * * /home/xxx/zzz.ksh But somehow does not work. Could it be wrong? (8 Replies)
Discussion started by: fretagi
8 Replies

5. Shell Programming and Scripting

Script fails to run properly when run from CRONTAB

Hello all, I'm trying to write a script to gather and send data and it works just fine at the bash command line, but when executing from CRON, it does not run properly. My scripting skills are pretty limited and there's probably a better way, but as I said it works at the command line, but... (12 Replies)
Discussion started by: rusman
12 Replies

6. UNIX for Dummies Questions & Answers

Execute crontab for every 4 hours and begin from current time

I want to add a crontab entry which should execute for every 4 hours and that 4 hours calculation should begin from the current time. Normally if I set the crontab entry like this, 00 */4 30 05 * root date >>/tmp/cronout The above will execute the date command for every 4 hours like... (7 Replies)
Discussion started by: Ganeshwari
7 Replies

7. Solaris

crontab to run every 20 second

Hi experts, I want to set the crontab for my script which will run every 20 seconds I think below could be the possible one- */3 * * * * /export/home/username/scripts/runing.sh As my system(SOLARIS 9) is live- i am confused to implement before make sure !!! I need... (4 Replies)
Discussion started by: thepurple
4 Replies

8. Solaris

How to define every 5 hours in Crontab

Hi Experts, I want to run a script which will move the files from particular directory to another backup directory After EVERY 5 hour. How can I put it in crontab- 5 hours!!! * * * * /home/movefilescritp.sh //purple (8 Replies)
Discussion started by: thepurple
8 Replies

9. Shell Programming and Scripting

How to make a script run for a maximum of "x" number of hours only

How to make a script run for a maximum of "x" number of hours only (7 Replies)
Discussion started by: ScriptDummy
7 Replies

10. UNIX for Dummies Questions & Answers

crontab every 2 minutes, 24 hours and once a week

can someone please check my answers for the crontabs I am making 1. how would I set up a crontab tab executes every 2 minutes each and every day of the week? answer: 2 * * * * /path/to/file.pl <-- is this correct? 2. how would I set up a crontab that executes every 24 hours at 2am?... (6 Replies)
Discussion started by: Bobafart
6 Replies
Login or Register to Ask a Question