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 ********************************************************************************