This firmware has built-in cron daemon which can be handy to run scheduled jobs (periodically).
- Go to
Administration > ServicesWebUI page,
- Turn on
Cron Daemon (Scheduler)?switch,
Scheduler tasks (Crontab)field,
Crontab field has the following syntax:
00 06 * * * ether-wake -i br0 XX:XX:XX:XX:XX:XX
00 06 * * * is the time to execute job (equals to "run every day at 06:00AM"),
ether-wake -i br0 XX:XX:XX:XX:XX:XX is the command to execute (wake up some PC with XX:XX:XX:XX:XX:XX MAC address). You can find details here.
Please note, this daemon inherits
$PATH variable from firmware (without
/opt/sbin), so you have to place full path to every executable outside of firmware. To avoid this, use shell wrapper
#!/bin/sh # Pull $PATH and other settings from /etc/profile and /opt/etc/profile . /etc/profile # Shell keywords shouldn't have a "-c" prefix [ "$1" = "-c" ] && shift # Call cron job SHELL=/bin/sh eval $@
Make it executable:
chmod +x /etc/storage/cron/shell-wrapper.sh
and place following string on top of crontab field:
Thanks to @Vladislav Grishenko for debugging shell wrapper script.