首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >不工作的工作(卷曲)

不工作的工作(卷曲)
EN

Ask Ubuntu用户
提问于 2019-09-26 04:27:17
回答 1查看 2.2K关注 0票数 0

我有一个使用Linux 19.04的服务器

我首先做了:nano /etc/crontab

下面的东西已经在档案里了

代码语言:javascript
复制
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

EN

回答 1

Ask Ubuntu用户

发布于 2019-09-26 05:13:55

我不知道这个文件是否是为此目的创建的,我通常会使用standart的功能来定期运行作业,但也许这是可能的。但是,正如您所看到的,这个文件中有一个用户字段,所以您也应该填充它,在此之后,可以肯定地说,:

systemctl重启cron.service

票数 0
EN
页面原文内容由Ask Ubuntu提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://askubuntu.com/questions/1176744

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档