Skip to content
Alexander Ryzhov edited this page Nov 24, 2015 · 3 revisions

Introduction

Cron is a time-based job scheduler, which is useful to run something periodically at fixed times, dates, or intervals. It typically automates system maintenance or administration.

Installation

opkg install cron

Configuration

Check the name of super user on your system. If it's other then root, please fix it at /opt/etc/crontab. As an example, asuswrt(-merlin) uses admin:

sed -i 's/root/admin/g' /opt/etc/crontab

Using cron

Please, refer to Vixie's crontab format to add new jobs to /opt/etc/crontab. Cron package contains some helper scripts, you may put some jobs (shell scripts or symlinks) to following folders:

/opt/etc/cron.1min
/opt/etc/cron.5mins
/opt/etc/cron.daily
/opt/etc/cron.hourly
/opt/etc/cron.monthly
/opt/etc/cron.weekly

and run cron by:

/opt/etc/init.d/S10cron start

Cron will be started automatically boot.

Links

Clone this wiki locally