Operating System - HP-UX
1826215 Members
2820 Online
109691 Solutions
New Discussion

crontab entry do not run on PM hours

 
NDO
Super Advisor

crontab entry do not run on PM hours

Hi All

I have a problem, I wonder if you can help me sort it out:

I have the following entry in the cron:

00 1,13 * * * /xxx/yyy/zzzz.ksh > ttttt.log

But the entry only runs at 01:00Am. I have stopped the cron deamon, and started, but it still does not work.

Can you help figure it out what is wrong with it?

FR

17 REPLIES 17
Patrick Wallek
Honored Contributor

Re: crontab entry do not run on PM hours

The crontab entry looks fine.  I don't see any obvious errors.

 

Is there any information in /var/adm/cron/log?

 

What about your ttttt.log file?

NDO
Super Advisor

Re: crontab entry do not run on PM hours

Hi

 

There is no error entry in the /var/adm/cron/log file. But the entry runs only for the 01:00

 

FR

Patrick Wallek
Honored Contributor

Re: crontab entry do not run on PM hours

Try setting up a separate line for the 1:00 PM execution:

 

00 1 * * * /xxx/yyy/zzzz.ksh > ttttt.log

00 13 * * * /xxx/yyy/zzzz.ksh > ttttt.log

NDO
Super Advisor

Re: crontab entry do not run on PM hours

Hi

 

The only entry that run was the one of 01:00AM, but this one:

00 13 * * * /xxx/yyy/zzzz.ksh > ttttt.log

did not run.

 

If I do grep "report" /var/adm/cron/log I can see an entry for the one executed at 01:00AM.

 

 

Patrick Wallek
Honored Contributor

Re: crontab entry do not run on PM hours

Can you run something else at 1:00 PM and see if it works? 

 

Try stopping and restarting cron.

 

# /sbin/init.d/cron stop

 

# /sbin/init.d/cron start

 

 

NDO
Super Advisor

Re: crontab entry do not run on PM hours

 

I have done that many times it only work for the 01:00AM entry, but I will do it again just before 01:00PM which is in about 21 hours from now, where I am :)

Dennis Handly
Acclaimed Contributor

Re: crontab entry do not run on PM hours

>I have done that many times it only work for the 01:00AM entry,

 

Are you using "crontab -e" or "crontab file" to edit your entries?

NDO
Super Advisor

Re: crontab entry do not run on PM hours

 

Hi

 

After stopping/starting, which did not solve the problem, a schedulled reboot has solved the problem.

Many thanks to all that contributed.

 

FR

NDO
Super Advisor

Re: crontab entry do not run on PM hours

yes, I am using crontab -e <user>
Ajin_1
Valued Contributor

Re: crontab entry do not run on PM hours

Hi
Check the ownership and permission of crontab ,This also may create problems. Check with working server.
Thanks & Regards
Ajin.S
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
NDO
Super Advisor

Re: crontab entry do not run on PM hours

Hi

 

crontab again not working

 

If I run

grep "max run limit" /var/adm/cron/log | more

 I got the following:

! c queue max run limit reached Fri Apr 13 14:50:00 SAST 2012
! c queue max run limit reached Fri Apr 13 14:50:00 SAST 2012
! c queue max run limit reached Fri Apr 13 14:50:00 SAST 2012
! c queue max run limit reached Fri Apr 13 14:51:00 SAST 2012
! c queue max run limit reached Fri Apr 13 14:51:00 SAST 2012

 But If I run:

more /var/adm/cron/queuedefs

 I have the following:

a.4j1n
b.2j2n90w

 only, so no c is present.

 

Do I have to change some setting?

 

FR

Dennis Handly
Acclaimed Contributor

Re: crontab entry do not run on PM hours

>! c queue max run limit reached Fri Apr 13 14:50:00 SAST 2012

 

Are you trying to run too many jobs at the same time?

 

>so no c is present.  Do I have to change some setting?

 

That's what mine looks like, it's fine.

queuedefs(4) has "a" for at(1) and "b" for batch(1).  And "c" is for crontab.

The default limit is 100, unless you set the variable DISABLE_MAXJOB_LIMIT to 1 in the /etc/default/cron file.

NDO
Super Advisor

Re: crontab entry do not run on PM hours

Hi

 

I think now the problem is solved, what I did was to change the text "a.4j1n" to "a.10j1n" in file "/var/adm/cron/queuedefs", them stopt/start cron deamon. So

nothing appears now, when I run "grep "max run limit" /var/adm/cron/log | more" and entries in the crontab are being executed.

 

But now I would like to know what would mean if I set the variable DISABLE_MAXJOB_LIMIT to 1 in the /etc/default/cron file?

 

FR

NDO
Super Advisor

Re: crontab entry do not run on PM hours

@Dennins:

 

on my system running 11.23 in the /etc/default/cron the entry "DISABLE_MAXJOB_LIMIT " is not there:

#more /etc/default/cron
##
# This is a configuration file used for setting the
# value for BATCH_MAXTRYS. BATCH_MAXTRYS determines the number
# of attempts batch(1) command should make for getting a uniqe job-id.
#
# Entry should be in the following format :
# BATCH_MAXTRYS=<value>
#    <value> can be any number greater than 0.
# or
# BATCH_MAXTRYS=INFINITE
#    If set to "INFINITE" batch(1) will try to get a uniqe job-id untill
#    successful.
BATCH_MAXTRYS=INFINITE
mceldev[495]/tmp/fr #

 And now the system is rescheduling entries :

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

 I really dont know what else to do...

Dennis Handly
Acclaimed Contributor

Re: crontab entry do not run on PM hours

>on my system running 11.23 in the /etc/default/cron the entry "DISABLE_MAXJOB_LIMIT " is not there:

 

Right.  It is only supported on 11.31.

 

>And now the system is rescheduling entries :

 

I thought you said you fixed it?

Are you really having 100 crontab entries firing off at exactly the same time?  (Or overlapping?)

NDO
Super Advisor

Re: crontab entry do not run on PM hours

I thought I fixed, but not. And I am not having 100 crontab entries. For root 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.

FR

Dennis Handly
Acclaimed Contributor

Re: crontab entry do not run on PM hours

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

 

queuedefs(4) says the max of all of simultaneous crontab, at AND batch is 100.

 

>but on my queuedefs file there is not a "c" line.

 

I suppose you could add one and specify "10w" to wait 10 seconds.