红联Linux门户
Linux帮助

AIX下做定时任务注意事项

发布时间:2014-06-01 11:26:57来源:红联作者:velcbo
AIX定时任务和Linux是一样的,都是用crontab去做。那我们这里就讲解一下crontab的基本语法:

minute hour day month dayofweek command

例如:

00 * * * * sh test.sh

那么就是每个小时的整点执行这个脚本

00 10 * * * sh test.sh

就是每天10点执行

这个没有太多好说的,度娘上一堆解释

关键是aix中要想定时任务可以执行,必须在sh脚本中开头加入. ~/.profile,例如,我这里有个脚本是执行删除rman的归档日志,内容如下:

. ~/.profile
rman target / log=/arch/rman_shell/arch_del.log cmdfile=/arch/rman_shell/arch_de
l.txt

作者:yangchen
文章评论

共有 0 条评论