E2 - Enabling cron daemon how to

arken

New member
Messages
293
In Linux cron daemon allows you to execute scheduled tasks at specific time/date. Useful for autoupdate keys, epg and many more...
SIFTeam Enigma2 has cron daemon already included in busybox binary. Here is a way to use it.

Telnet to your box and execute the following commands:
Code:
mkdir -p /var/spool/cron/crontabs
touch /var/spool/cron/crontabs/root

Now edit /var/etc/rcS_user.sh and add the following line at the end:
Code:
# cron daemon
/usr/sbin/crond &

(I know that the proper way to autostart is within init.d, but flash users cant edit it)

Now you can add jobs by editing /var/spool/cron/crontabs/root file. (for some reason crontab -e doesnt work).

For example:
Code:
30 01 * * * /var/script/examplescript.sh ## the job will start every day at 01:30 h.
30 01 30 * * /var/script/examplescript.sh ## the job will start at 30th every mnont at 01:30h
30 01 * * 0 /var/script/examplescript.sh ## the job will start every sunday at 01:30h
 
Last edited:

Netfreak

New member
Messages
10
Thanks,
13,33 * * * * /var/bin/T.sh
cat /var/bin/T.sh
#!/bin/sh
ntpdate -b -u 192.168.1.12
This solves my timeproblem
 

Robinson74

New member
Messages
527
Can somebody help, please?
How to write a script which pings my router and then put it in cron so that the script is executed every minute?
I don't have experience with scripts.
 
Top