cron 不能在开机时自动启动

stevens 2008-06-03 11:58:29
以下是环境和CRON 文件 请给以提示 谢谢
//----------------环境: solaris9
cd /etc/init.d
root@lifesvr # more cron
#!/sbin/sh
#
# Copyright (c) 1997-1998 by Sun Microsystems, Inc.
# All rights reserved.
#
#ident "@(#)cron 1.13 98/04/19 SMI"

case "$1" in
'start')
if [ -p /etc/cron.d/FIFO ]; then
if /usr/bin/pgrep -x -u 0 -P 1 cron >/dev/null 2>&1; then
echo "$0: cron is already running"
exit 0
fi
fi

if [ -x /usr/sbin/cron ]; then
/usr/bin/rm -f /etc/cron.d/FIFO
/usr/sbin/cron &
fi
;;

'stop')
/usr/bin/pkill -x -u 0 -P 1 cron
;;

*)
echo "Usage: $0 { start | stop }"
exit 1
;;
esac
exit 0
...全文
80 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

23,110

社区成员

发帖
与我相关
我的任务
社区描述
Linux/Unix社区 应用程序开发区
社区管理员
  • 应用程序开发区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧