Posted by: Admin
Easy Tutorial to Install Cron on OpenPLi images - 12/27/20 01:04 PM
Easy Tutorial to Install Cron on OpenPLi images
Cron binary is busybox-cron, that needs to be installed, with commands below.
Then if the folder doesn't exist create the folders below
to edit crontab -e
and lines in cron are as below,
and an example of a script that checks oscam,
Reboot everyday at 1am, and get box in standby at 1.10am
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