User Tools

Site Tools


aix:aix_crontab

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
aix:aix_crontab [2024/01/11 10:09]
manu [Crontab and log management]
aix:aix_crontab [2025/04/29 15:59] (current)
manu
Line 17: Line 17:
 [root@aixna001]/​root>​ crontab -l lpar2rrd [root@aixna001]/​root>​ crontab -l lpar2rrd
 0 1 * * * /​usr/​bin/​perl /​opt/​lpar2rrd-agent/​lpar2rrd-agent.pl lnxmonitor01 > /​var/​tmp/​lpar2rrd-agent.out 2>&1 0 1 * * * /​usr/​bin/​perl /​opt/​lpar2rrd-agent/​lpar2rrd-agent.pl lnxmonitor01 > /​var/​tmp/​lpar2rrd-agent.out 2>&1
 +40 18 * * 1,2,3,4,5 ( . /​home/​lpar/​.bash_profile ; /​myscript/​script01.sh ) >/​dev/​null 2>&1
 </​cli>​ </​cli>​
  
Line 25: Line 26:
 </​cli>​ </​cli>​
  
 +Fields description
 +  * minute: ​         0 through 59
 +  * hour:            0 through 23
 +  * day_of_month: ​   1 through 31
 +  * month: ​          1 through 12
 +  * weekday: ​        0 through 6 for Sunday through Saturday
  
 +FIXME 
 +On linux (NOT AIX) you can also use for very 10 minutes, */10   
 +   ​0,​10,​20,​30,​40,​50 6 * * 1-5 /​usr/​bin/​calendar 
 +   */10 * * 1-5 /​usr/​bin/​calendar
  
 ==== Cron log ==== ==== Cron log ====
Line 50: Line 60:
   compress   compress
 </​cli>​ </​cli>​
 +
 +==== Errors ====
 +
 +I found that the log is located in **/​var/​adm/​log**. Further we are getting this error repeatedly ever since this date/time. How do I clear this max limit?
 +  c queue max run limit reached Fri Nov 25 21:52:00 2016
 +  ! rescheduling a cron job Fri Nov 25 21:52:00 2016
 +  ​
 +The cron daemon has a limit of how many jobs it can run simultaneously. By default it is 100 jobs. If a new job is scheduled to run, and the limit has already been reached, the job will be rescheduled at a later time (the default is 60 seconds later). Both the number of jobs and wait time are configured in the file **/​var/​adm/​cron/​queuedefs**.
 +
 +To do this, add an entry to the bottom of the /​var/​adm/​cron/​queuedefs file using an editor such as vi. The entry should have the form:
 +  c.50j20n60w
 +where
 +  * c. = The "​c"​ or cron queue, followed by a period separator.
 +  * Nj = The maximum number of jobs to be run simultaneously by cron, followed by the letter "​j"​.
 +  * Nn = The "​nice"​ value of the jobs to be run (default is 2), followed by the letter "​n"​.
 +  * Nw = The time a job has to wait until the next attempt to run it, followed by the letter "​w"​.
 +
 +For example:
 +  This example would set the cron queue to a maximum of 200 jobs, with a nice value of 2, and a wait time of 60 seconds.
 +<cli prompt='#'>​
 +root@orathal-test /var/tmp# cat /​var/​adm/​cron/​queuedefs
 +c.200j2n60w
 +</​cli>​
 +
 +c.200j2n60w
 +
aix/aix_crontab.1704964159.txt.gz · Last modified: 2024/01/11 10:09 by manu