AIX下crontab不执行
2013-11-01 21:26
429 查看
AIX的crontab不执行.有一台P570,AIX5.3 的crontab非常的怪:
需要每周重启一次机器,要不然所有用户的cron 任务就根本不执行.
(用户的环境变量没有问题,若reboot后,不做任何修改配置,系统会自动去执行cron,但3-5天后,系统又莫明其妙的不执行cron了,reboot后,系统又恢复正常)
查看/var/adm/cron/log 文件,里面报错信息如下:
# tail log
! 0481-095 The cron job is being rescheduled.
Fri Mar2 09:22:00 BEIST 2007
! cron: 0481-087 The c queue maximum run limit has been reached.
Fri Mar2 09:22:00 BEIST 2007
! 0481-095 The cron job is being rescheduled.
Fri Mar2 09:22:00 BEIST 2007
! cron: 0481-087 The c queue maximum run limit has been reached.
Fri Mar2 09:22:00 BEIST 2007
! 0481-095 The cron job is being rescheduled.
Fri Mar2 09:22:00 BEIST 2007
! cron: 0481-087 The c queue maximum run limit has been reached.
Fri Mar2 09:22:00 BEIST 2007
! 0481-095 The cron job is being rescheduled.
Fri Mar2 09:22:00 BEIST 2007
# ls -l
total 184992
prw------- 1 root cron 0 Mar
02 09:06 FIFO
-rw-r----- 1 bin cron 4 Jun 21 2004at.deny
-rw-r----- 1 bin cron 3 Jun 21 2004cron.deny
-rw-rw-r-- 1 bin bin 94652447 Mar 02 09:25 log
-rw-r--r-- 1 root sys 1317 Jun 17 2004queuedefs
# df -g
Filesystem GBblocks Free %Used Iused %Iused Mounted on
/dev/hd4 4.00 1.42 65% 8940 3% /
/dev/hd2 3.00 2.01 34% 21787 5% /usr
/dev/hd9var 1.12 0.33 71% 350 1% /var
/dev/hd3 3.88 3.79 3% 569 1% /tmp
/dev/hd1 27.88 12.14 57% 24825 1% /home
/proc - - - - -/proc
/dev/hd10opt 0.12 0.08 38% 819 5% /opt
/dev/fslv00 128.62 31.44 76% 12248 1% /backup
会不会是因为/var 的空间不够了?
crontab 没有定时执行是因为“!cron:
0481-087 The c queue maximum run limit has been reached.”。
修改/var/adm/cron/queuedefs 文件。
在里面加上这样一句:"c.200j20n60w",然后killPID,其中PID为cron进程号,新的cron设置就会生效。
Maximum number of jobs in the queue by default
was 50. The error messages 0481-087, 0481-095 usually appears when this max number
is reached. So you can increase
the maximum number of jobs in /var/adm/cron/queuedefs ,
vi the queuedefs fileand change
the b to c
and the 50 to
200. by including this entry"c.200j20n60w"in the
file. After making the changes to the file, killcron and it will respawn
again with the new settings.
# here is an example of a low prority (nice 20), 50
entry batch queue
# b.50j20n60w
c.1000j2n60w
在queuedefs加以C队列为1000就可以了.
c.1000j2n60w 这什么含义? 特别是j2n60w直接看queuedefs文件,里面讲得很清楚了
# cron values for each queue of batch jobs:
#
# queue.xxjxxnxxw
#
# queues:
#a - sh jobs d - sync event
#b -
batch jobs e - ksh jobs
#c - cron event
f - csh jobs
#
#xxj - maximum number of jobs in this queue (deafult 100)
#xxn - nice value at which these jobs will run at (default 2)
#xxw - wait time till next execution attempt (default 60 seconds)
#
#
# here is an example of a low prority (nice 20), 50 entry batch queue
# b.50j20n60w
需要每周重启一次机器,要不然所有用户的cron 任务就根本不执行.
(用户的环境变量没有问题,若reboot后,不做任何修改配置,系统会自动去执行cron,但3-5天后,系统又莫明其妙的不执行cron了,reboot后,系统又恢复正常)
查看/var/adm/cron/log 文件,里面报错信息如下:
# tail log
! 0481-095 The cron job is being rescheduled.
Fri Mar2 09:22:00 BEIST 2007
! cron: 0481-087 The c queue maximum run limit has been reached.
Fri Mar2 09:22:00 BEIST 2007
! 0481-095 The cron job is being rescheduled.
Fri Mar2 09:22:00 BEIST 2007
! cron: 0481-087 The c queue maximum run limit has been reached.
Fri Mar2 09:22:00 BEIST 2007
! 0481-095 The cron job is being rescheduled.
Fri Mar2 09:22:00 BEIST 2007
! cron: 0481-087 The c queue maximum run limit has been reached.
Fri Mar2 09:22:00 BEIST 2007
! 0481-095 The cron job is being rescheduled.
Fri Mar2 09:22:00 BEIST 2007
# ls -l
total 184992
prw------- 1 root cron 0 Mar
02 09:06 FIFO
-rw-r----- 1 bin cron 4 Jun 21 2004at.deny
-rw-r----- 1 bin cron 3 Jun 21 2004cron.deny
-rw-rw-r-- 1 bin bin 94652447 Mar 02 09:25 log
-rw-r--r-- 1 root sys 1317 Jun 17 2004queuedefs
# df -g
Filesystem GBblocks Free %Used Iused %Iused Mounted on
/dev/hd4 4.00 1.42 65% 8940 3% /
/dev/hd2 3.00 2.01 34% 21787 5% /usr
/dev/hd9var 1.12 0.33 71% 350 1% /var
/dev/hd3 3.88 3.79 3% 569 1% /tmp
/dev/hd1 27.88 12.14 57% 24825 1% /home
/proc - - - - -/proc
/dev/hd10opt 0.12 0.08 38% 819 5% /opt
/dev/fslv00 128.62 31.44 76% 12248 1% /backup
会不会是因为/var 的空间不够了?
crontab 没有定时执行是因为“!cron:
0481-087 The c queue maximum run limit has been reached.”。
修改/var/adm/cron/queuedefs 文件。
在里面加上这样一句:"c.200j20n60w",然后killPID,其中PID为cron进程号,新的cron设置就会生效。
Maximum number of jobs in the queue by default
was 50. The error messages 0481-087, 0481-095 usually appears when this max number
is reached. So you can increase
the maximum number of jobs in /var/adm/cron/queuedefs ,
vi the queuedefs fileand change
the b to c
and the 50 to
200. by including this entry"c.200j20n60w"in the
file. After making the changes to the file, killcron and it will respawn
again with the new settings.
# here is an example of a low prority (nice 20), 50
entry batch queue
# b.50j20n60w
c.1000j2n60w
在queuedefs加以C队列为1000就可以了.
c.1000j2n60w 这什么含义? 特别是j2n60w直接看queuedefs文件,里面讲得很清楚了
# cron values for each queue of batch jobs:
#
# queue.xxjxxnxxw
#
# queues:
#a - sh jobs d - sync event
#b -
batch jobs e - ksh jobs
#c - cron event
f - csh jobs
#
#xxj - maximum number of jobs in this queue (deafult 100)
#xxn - nice value at which these jobs will run at (default 2)
#xxw - wait time till next execution attempt (default 60 seconds)
#
#
# here is an example of a low prority (nice 20), 50 entry batch queue
# b.50j20n60w
相关文章推荐
- 如何用crontab每隔1分钟执行一个命令行脚本
- crontab 小于一分钟执行一次
- Linux定时任务crontab执行脚本出错
- 如何让AIX、LINUX的History命令显示执行时间
- ubuntu docker中crontab任务不执行的问题
- Linux crontab 每分钟、每小时、每天、每周、每月、每年定时执行
- crontab 执行脚本***.sh 方法
- linux crontab 无法执行shell脚本解决方法
- liunx 使用crontab 定时执行curl
- Linux的Crontab定时执行PHP脚本的方法
- unix中无法使用crontab设置执行计划
- shell在crontab中不能执行问题的解决方案
- linux命令之crontab定时执行任务
- crontab定期执行命令详解,以及实例
- Linux(Red Hat5)下使用crontab定时执行java程序
- Linux下使用crontab来执行定时任务计划----执行每晚12点多执行移动log日志文件操作
- crontab介绍 + 小示例 + crontab不执行的原因
- 在linux下利用crontab定时执行PHP脚本
- ubuntu中通过crontab执行python任务
- crontab定时hadoop任务没有执行