Thursday, September 6, 2018

Solaris 10 - cron job didn't run at scheduled time.

Solaris 10 - cron job didn't run at scheduled time.

Checking log shows queue max run limit reached

# cat /var/cron/log
......
The problem: queue max limit reached
Solution: Restart the con service

1. Find the cron process
# ps -ef | grep cron
# ptree <PID>
# kill -9 <PID>

2 Restart cron service
# svcadm restart svc:/system/cron

3. raise the limit
# vi /etc/cron.d/queuedefs

if you still have issue, review queuedefs man page.

# more /etc/cron.d/queuedefs
a.4j1n
b.2j2n90w

# man queuedefs

       This file specifies that the a queue, for at jobs, can  have  up  to  4
       jobs  running  simultaneously; those jobs will be run with a nice value
       of 1.  As no nwait value was given, if a job cannot be run because  too
       many  other  jobs  are  running cron will wait 60 seconds before trying
       again to run it.

       The b queue, for batch(1) jobs, can have up to 2 jobs running  simulta-
       neously;  those  jobs  will be run with a nice(1) value of 2.  If a job
       cannot be run because too many other jobs are  running,  cron(1M)  will
       wait  90  seconds  before  trying again to run it. All other queues can
       have up to 100 jobs running simultaneously; they will  be  run  with  a
       nice value of 2, and if a job cannot be run because too many other jobs
       are running cron will wait 60 seconds before trying again to run it.

No comments:

Post a Comment