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


Attachments
busybox-cron_1.24.1-r0_mips32el.zip (1 downloads)
busybox-cron_1.24.1-r0_mips32el-nf.zip (1 downloads)
busybox-cron_1.24.1-r0_cortexa15hf-neon-vfpv4.zip (1 downloads)
busybox-cron_1.24.1-r0_aarch64.zip (1 downloads)

_________________________