Easy Tutorial to Install Cron on OpenPLi images

Cron binary is busybox-cron, that needs to be installed, with commands below.

Code:
opkg update
opkg install busybox-cron


Then if the folder doesn't exist create the folders below

Code:
mkdir /etc/cron
mkdir /etc/cron/crontabs

to edit crontab -e

and lines in cron are as below,

Code:
*/1 * * * * /etc/OSCamCheck.sh

and an example of a script that checks oscam,

Code:
#!/bin/sh
#DESCRIPTION=Relaunch OSCam if not running

if ps w |grep -v grep |grep -c oscam >/dev/null
then
    echo "OSCam... ok"
else
    echo "OSCam... restarting"
    killall oscam > /dev/null
    sleep 5
    /etc/init.d/softcam restart
fi


Reboot everyday at 1am, and get box in standby at 1.10am
Code:
1 1 * * * reboot
10 1 * * * wget -O /dev/null -q http://root:@localhost/web/powerstate?newstate=0


Attachments
busybox-cron_1.24.1-r0_mips32el.zip (32 downloads)
busybox-cron_1.24.1-r0_mips32el-nf.zip (11 downloads)
busybox-cron_1.24.1-r0_cortexa15hf-neon-vfpv4.zip (8 downloads)
busybox-cron_1.24.1-r0_aarch64.zip (7 downloads)

_________________________