crontab -e
crontab内容
*/59 * * * * sh /home/restartAllSlave.sh >> /home/my-restartAllSlave.log 2>&1
docker重启如下:
docker restart slave_zllrp_gb_1 slave_zllrp_gb_2 slave_zllrp_gb_3
fastdfs删除30天前文件如下:
sudo find /home/light/project/dev/fastdfs_storage/data/ -mtime +30 -name "*.jpg*" -exec rm -rf {} \;
touch /home/my-restartAllSlave.log
sudo chown root:adm /home/my-restartAllSlave.log
sudo chmod 664 /home/my-restartAllSlave.log
crontab -l