首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何测试命令anacron?

如何测试命令anacron?
EN

Stack Overflow用户
提问于 2017-02-26 08:17:11
回答 1查看 1.5K关注 0票数 1
代码语言:javascript
复制
uname -r
4.5.5-300.fc24.x86_64

我把0 0 test touch ~/ana.cron附在/etc/anacrontab后面了。但是,在重新启动或从睡眠中恢复或运行sudo anacron -f之后没有任何效果。我找不到输出文件ana.cron

cat /etc/anacrontab

代码语言:javascript
复制
# /etc/anacrontab: configuration file for anacron

# See anacron(8) and anacrontab(5) for details.

SHELL=/bin/sh
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
# the maximal random delay added to the base delay of the jobs
RANDOM_DELAY=45
# the jobs will be started during the following hours only
START_HOURS_RANGE=3-22

#period in days   delay in minutes   job-identifier   command
1   5   cron.daily      nice run-parts /etc/cron.daily
7   25  cron.weekly     nice run-parts /etc/cron.weekly
@monthly 45 cron.monthly        nice run-parts /etc/cron.monthly
0 0 test touch ~/ana.cron

如何解决这个问题?

EN

回答 1

Stack Overflow用户

发布于 2017-02-26 14:48:22

我不确定这段时间可以是0。

代码语言:javascript
复制
1 0 test.daily nice run-parts touch ~/ana.cron

如果希望在启动时运行任务,请使用@reboot

代码语言:javascript
复制
@reboot test.reboot nice run-parts touch ~/ana.cron
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/42466259

复制
相关文章

相似问题

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