crond和corntab都是busybox下的一个工具,crond是一个后台进程,每隔一分钟读取配置文件中的参数,执行对应的动作。crontab是提供的一个命令行,可以对配置文件进行增删改查。这个定时功能对于平常一些功能使用很方便,比如每天晚上12点重启路由器等。
1、openwrt上启动crond进程
crond的启动参数如下:
一般就设置-c指定文件目录,-l日志等级
# crond -h
crond: invalid option -- h
BusyBox v1.22.1 (2022-03-14 17:26:20 CST) multi-call binary.
Usage: crond -fbS -l N -L LOGFILE -c DIR
-f Foreground
-b Background (default)
-S Log to syslog (default)
-l Set log level. 0 is the most verbose, default 8
-L Log to file
-c Working dir
openwrt中还是在/etc/init.d/中有cron启动程序,如下</