crontab每月最后一天执行

简介: crontab里设定一条:0 12 28-31 * * sh /tmp/start.shstart.sh 脚本如下:*************************************************...
crontab里设定一条:
0 12 28-31 * * sh /tmp/start.sh
start.sh 脚本如下:
******************************************************************************
#!/usr/bin/ksh
#this script is used to start the xxx in the last day of every month
ym=`date +%m" "%Y`
if [ `date +%d` = `cal $ym|xargs|awk '{print $NF}'` ]
then
sh yourscripts
fi
********************************************************************************
目录
相关文章
|
11月前
|
Shell Android开发
crontab执行脚本报错手动执行正确
crontab执行脚本报错手动执行正确
crontab安装以及定时任务的执行
crontab安装以及定时任务的执行
109 0
|
Shell PHP 关系型数据库
|
Shell Linux 调度