定时任务crond

00 19 * * * sh /tmp/sem.sh>/dev/null 2>&1

28 16 * * * /usr/bin/salt '*' cmd.run 'df -hl'>/tmp/hd.$(date +\%F).txt

28 16 * * * /usr/bin/salt '*' cmd.run 'free -l'>/tmp/mem.$(date +\%F).txt


vim /tmp/sem.sh

echo "Hi,$(date +%F)硬盘和内存数据采集如附件。" |mutt [email protected] -s "硬盘和内存采集-$(date +%F)" -a /tmp/hd.$(date +%F).txt /tmp/mem.$(date +%F).txt

你可能感兴趣的:(定时任务crond)