服务器会用到的SHELL

来源:互联网 发布:湖北网络广播电视 编辑:程序博客网 时间:2024/06/01 08:02

#!/bin/bash

#httpd_restart.sh

SERVER_STATUS = 'ps -ef |grep -v grep|grep httpd|wc -l'

if [$SERVER_STATUS -eq 0]

then /usr/sbin/apachectl start

fi

centos 定时任务 cron

用户任务在/var/spool/cron/*

全局任务/etc/crontab文件

可以使用crontab -e直接编辑