Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Excerpt

cru enables you to check/add/delete cron job on your Asuswrt Merline Wifi Router. Because Asuswrt does not save all the cron job by the limited storage, you should add cron job at /jfss/scripts/init-start, so the cronjob will be done as designed.




Table of Contents

Basic functions of cron job in Asuswrt Merlin Wifi Router

...

Code Block
vi /jffs/scripts/servicesinit-start


And add your command like below. Below is the case to update DNS every 10mins

Code Block
cru a ddns "*/10 * * * * /usr/sbin/wget -O /dev/null 'httphttps://ddns.dnszi.com/set.html?user=<your_id>&auth=<your_auth>&domain=<your_domain>&record=<your_record>' --no-check-certificate"


Reboot Asuswrt every 12 hours

Code Block
cru a ddnsreboot12 "0 */12 * * * /sbin/reboot"


Reboot Asuswrt at 5:30 AM

Code Block
cru a ddnsreboot0530 "30 5 * * * /sbin/reboot"

...

To enable boot time support for /jffs/scripts/, you should check following options:


Update at  

AsusWRT also supports custom DDNS. In order to access web interface, go to Setup > DDNS > Select Custom DDNS

Create ddns-start at /jffs/script and put something like below:

Code Block
#!/bin/sh
IP=$(curl -s http://ip1.dynupdate.no-ip.com)
curl -s "https://yourddnsprovider.com/update?hostname=yourhost.example.com&myip=$IP"