Basic functions of cron job in Asuswrt Merlin Wifi Router

Add a new cron job

cru a {id} min hour day moth week command

Where:

List cron jobs

cru l

Delete cron job

cru d {id}


Example of Cron Job

Let us add cron job on Asuswrt Merlin Wifi router to ping gateway every 1 hour, run:

cru a pinggw "0 * * * * /bin/ping -c 10 -q 192.168.2.254"


Above cron job will run /bin/ping command that sends only 10 pings and only display output at start.
To list current jobs run:

cru l


To delete current jobs run:

cru d pinggw


Verify it:

cru l


Create/Edit a script called services-start


Type the following command

vi /jffs/scripts/services-start


And add your command like below

cru a pinggw "0 * * * * /bin/ping -c 10 -q 192.168.2.254"