我有一个使用Linux 19.04的服务器
我首先做了:nano /etc/crontab
下面的东西已经在档案里了
SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
# m h dom mon dow user command
13 * * * * root cd / && run-parts --report /etc/cron.hourly
18 00 * * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )
33 00 * * 7 root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly )
43 00 1 * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.monthly )
#我在#行的末尾加上了这个
*/1 * * * * curl -s "https://www.example.com/abc" > /dev/null
发布于 2019-09-26 05:13:55
我不知道这个文件是否是为此目的创建的,我通常会使用standart的功能来定期运行作业,但也许这是可能的。但是,正如您所看到的,这个文件中有一个用户字段,所以您也应该填充它,在此之后,可以肯定地说,:
systemctl重启cron.service
https://askubuntu.com/questions/1176744
复制相似问题