Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我对 cron 工作有疑问,
假设我是否想通过电子邮件发送 df 输出的副本每 5 分钟安排一次任务。
:~$crontab -e
crontab -e
5 * * * * df -h
该指南说它将通过电子邮件发送给 crontab 文件所属的用户(根据配置文件),我如何检查它是否通过了?
当我执行
:~$crontab -l
crontab -l
我可以看到我输入的计划任务。
或者,我有没有机会看到输出?
If you want it to run every 5 minutes, the syntax is:
*/5 * * * * df -h
What you wrote will run it every hour at 5 minutes after the hour.
P.S. Questions like this are more appropriate for unix.stackexchange.com.