[Seek Help] cron计划任务不执行
Tofloor
poster avatar
幽灵
deepin
2022-07-02 18:40
Author

我用crontab -e命令建了一个计划任务,命令如下:

*/1 * * * * /usr/bin/ping -c 2 192.168.111.100 >> /home/xx/Documents/ping.txt

这是测试用的,每分钟ping一下,结果输出到ping.txt文档,结果发现ping文档一直是空的,貌似计划任务没有执行,按照网上说的检查了cron服务正常,重启服务也不行,也找不到/var/log/cron.log日志,请大家帮我解惑。

Reply Favorite View the author
All Replies
weboob
deepin
2022-07-02 18:54
#1

请看资料
image.png
另外格式他是这么写的
image.png

* * * * * /usr/bin/ping -c 2 www.baidu.com >> ~/test.txt

image.png

感觉没问题呢

Reply View the author
幽灵
deepin
2022-07-03 06:47
#2
weboob

请看资料
image.png
另外格式他是这么写的
image.png

* * * * * /usr/bin/ping -c 2 www.baidu.com >> ~/test.txt

image.png

感觉没问题呢

*/1这样写也没有什么问题吧

Reply View the author