I have a curious question. It appears that the current distributions of AREDN do not include the cron daemon. I don't even find a package in the administration screen that allows the daemon to be loaded. Even more curious is that the crontab command is installed and looks like that is being installed from the busybox package.
So I can add the following with "crontab -e":
* * * * * touch /tmp/crontest
And after several minutes I don't have a /tmp/crontest. I don't even have a cron startup script in /etc/init.d
root@wt0f-aredn-vm:/etc/crontabs# ls /etc/init.d boot dropbear led manager olsrd sysctl system umount vtund dnsmasq firewall local meshchatsync olsrd6 sysfixtime telnet urandom_seed vtundsrv done gpio_switch log network rpcd sysntpd uhttpd urngd wpad
I have the same results on both the 3.23.4.0 release and a nightly release that I installed on another hAP a couple of weeks ago.
Is this a packaging oversight or intentional?
https://openwrt.org/docs/guide-user/base-system/cron
# Edit configuration
crontab -e
# Show configuration
crontab -l
# Apply changes
/etc/init.d/cron restart
This will edit the configuraion /etc/crontabs/root file in vi editor.
:!: There should be a EOL character on the last line of the crontab file. Just leave an empty line at the end to be sure.
I don't seem to have cron either.
Searched /bin and /sbin
Firmware 3.23.4.0:
root@NC8Q-AR7:/# which cron
root@NC8Q-AR7:/#
73, Chuck
Editing crontabs is not a problem and has never been an issue. The problem is that there is not a cron daemon to process the crontab files and execute the command within them. Even the OpenWRT pages are incorrect on this issue. It does not seem that OpenWRT actually uses "cron" as I can not find a package in their repository for any architecture.
I was able to locate this page: https://openwrt.org/packages/pkgdata/micrond. I had to dig around in their package repository for quite a while to find the package as it was not in the version that I had been pulling other packages from. Not sure what version it was introduced but the later versions do have it.
That is about the closest that I can find a cron daemon on OpenWRT. Not quite a drop in replacement for cron, but close enough. It defaults to putting crontabs in /usr/lib/micrond.d (or something like that. Updating the init.d script (variable at top) allows one to set it to /etc/crontabs. It also is not the GNU version of micrond (documented here: https://www.gnu.org.ua/software/micron/manual/Overview.html) as it does not have any of the command line switches or provide any ability to have multiple locations for crontab files. Also it takes the original form of crontab entry where there is not a user name inserted between the schedule and command. I have also found that it has no ability to rescan files for changes to crontabs. One must restart micrond if there is a change to crontabs.
I think you answered your own question. Since the upstream parent project of AREDN is OpenWRT, when AREDN syncs with the latest version of OpenWRT there are various changes that become part of the AREDN firmware. When OpenWRT retired the cron daemon, AREDN inherited that change.
Because of this, the AREDN developers implemented their own simplified method of periodically running specific scripts (manager.lua). You can look at the source code in /usr/local/bin/mgr/periodic.lua. You'll notice that it will run any scripts it finds in any of these directories which are typical of the standard Linux crontab: /etc/cron.hourly, /etc/cron.daily, & /etc/cron.weekly