linux write regular tasks, tracking whether to hang up

shell script

#!/bin/bash

a = `netstat -unltp | grep FDF | wc -l`

echo "$a"
if [ "$a" -ne "1" ];then
    `fdfs_storaged /etc/fdfs/storage.conf start`
be

 Set by the timer task crontab

crontab -e, one minute to perform a script
* * * * * sh /home/fr/test.sh

 View crontab log

 tailf var/log/cron

  

Guess you like

Origin www.cnblogs.com/royfans/p/12018434.html