Note that this location resides in RAM, so you would have to put your cron script somewhere such as in the jffs partition such as /jffs/scripts. The file must be named “admin” as this is the name of the system user. You can put your cron tasks in /var/spool/cron/crontabs/. You can create scheduled tasks using the standard crond service that runs on the router. Support for these scripts stored under /jffs/scripts/ must be enabled, under Administration -> System on the webui:Īnd there you have it, I just add cron job on Asuswrt Merlin Wifi Router. Make sure you set executable permission using the chmod command:Ĭhmod a+rx /jffs/scripts/usb-backup-script.sh Enable boot time support for /jffs/scripts/ The syntax is pretty simple: Add a new cron jobĬru a cru command syntax to add, list, and delete cron jobs It also checks the /var/spool/cron/ directory. The cron service (daemon) runs in the background and constantly checks the /etc/crontab file, and /etc/cron.*/ directories. Cron is one of the most useful tools in a Linux or UNIX like operating systems.
You can schedule scripts to be executed periodically.
What is a cron on Linux?Ĭron allows Linux and Unix users to run commands or scripts at a given date and time. You need to use the cru command to list, delete, or add new cron jobs. How to add cron job on Asuswrt Merlin Wifi Router