Meister Hora war da !
Cronmanager 1.5 mit Fix für das Gemini 1.6
Das ZIP file ist der volle kit mit readme.txt und bzip2 kit, das tar.bz2 file
ohne das ist direkt fürs BP.
gruss
thowi
=======================================================================
Cronmanager for Dreambox 7025 1.5 by thowi from 2. July 2006
=======================================================================
Cronmanager is FREEWARE, but this means also that nobody takes
responsibility if anything goes wrong
=======================================================================
Version History
=======================================================================
BETA 0.7 this is the first BETA of cronmanager
BETA 0.8 some small bugfixes and more examples
BETA 1.0 add check if command exists and further examples
Version 1.2 add wizzards for install and restart options
Version 1.3 add wizzard for scheduling with delay
Version 1.4 add engima1 code to cronmanager.sh
Version 1.5 add /var/spool fix for newer images
add e2r.sh to examples for enigma restart of ER
=======================================================================
Der Englische Text ist unterhalb des Deutschen Text !
The English text is below the German text !
=======================================================================
HOW-TO-CRONMANAGER
=======================================================================
Am PC das runtergeladene cronmanagerXX.zip mit WinZiP oder ähnlichem
auspacken und das erhaltene cronmanagerXX.tar.bz2 File per FTP in
/var/tmp deiner Dreambox 7025 schieben (und evt. doch das
readme.txt am PC LESEN !).
Dann in die Dreambox mit Telnet einloggen und folgendes eingeben
- ODER den Blue Pannel Manual Addon Install verwenden wen in deinem
Image verfügbar.
> cd /
> bunzip2 /var/tmp/cronmanagerXX.tar.bz2
> tar -xvf /var/tmp/cronmanagerXX.tar
> /var/tmp/cronmanager.sh enable
Nicht schrecken, am Schluß rebootet das script bei einable
und disable die Box.
Dann sollten im Menu Spiele/Erweiterungen der Dreambox bereits
das Cronmanager addon auftauchen.
Mit der Install option enable in Cronmanager addon menu geht
die installation auch falls man
den Kit mit Bluepannel installiert hat und nachher enigma restartet
damit das addon menu auftaucht.
Derzeit gibt es folgende eigentlich selbsterklärende optionen des
cronmanagers:
list .... gibt den Inhalt der crontab aus
add .... fügt Kommandos zur crontab hinzu mit Zeit
delay .... fügt Kommandos zur crontab hinzu mit Verzögerung
delete .... löscht die crontab
info .... zeigt ob der cron dameon läuft
time .... zeigt die system Zeit an die der cron dameon verwendet
start .... startet den cron dameon
stop .... stoppt den cron dameon
restart .... restartet den cron daemon
reload .... läßt den cron dameon die crontab neu laden
enable .... installiert den cronmanager und enabled den cron dameon
disable .... deinstalliert den cronmanager und entfernt den cron dameon
reboot .... rebootet die Dreambox
halt .... stoppt die Dreambox
kill .... restartet enigma
man .... zeigt das readme.txt vom cronmanager
Der ganze cronmanager wird auf /etc/cron installiert und die crontab wird
von /var/spool/cron dorthin verlinked !
Cronmanager gibt es als addon im Spiele/Erweiterunge Menu und als script
cronmanager.sh auf /etc/cron
Man kann jetzt mit ein paar kleinen testscripts die auf /etc/cron/examples
liegen den cronmanager testen:
slt.sh
Das ist ein script für den sleeptimer, im Moment macht es eigentlich nur ein
shutdown -h now. Aufpassen wenn man das zu oft einplant hat man Spass !
rmc.sh
Das ist ein kleines script das praktisch nur die enigma crashes auf
/media/hdd entfernt. Zum Testen von rmc.sh evt. einfach dummy
crashes mit touch anlegen und sehen wie es verschwindet wenn
rmc.sh eingeplant ist:
touch /media/hdd/enigma2_crashes_dummy
ls /media/hdd/enigma2_crashes_*
(vor und nach 8:30 wiederholen bzw. Zeitpunkt entsprechend anpassen)
iup.sh
Das ist ein kleines script das ein ipkg update & upgrade durchführt
um über das Internet das Image mit den neuesten ipkg Files upzudaten.
fsc.sh
Das is ein kleines script das einen reboot macht bei dem ein Filesystemcheck
erzwungen wird (tut der Harddisk ab und an sicher gut)
e2r.sh
Ist ein kleines Beispielscript das mit init 2 und init 3 enigma restartet.
Es wird vom ER Plugin verwendet um neue timers.xml zu laden.
Wenn man cronmanager command verwenden will, so übergibt man als parameter nach
dem Kommando das man ausführen will (muss derzeit ein script auf
/etc/cron sein) noch den Zeitpunkt für das ausführen nach folgender Syntax:
* * * * *
- - - - -
| | | | |
| | | | ----- Tag der Woche (0 - 6) (Sonntag=0)
| | | ------- Monat (1 - 12)
| | --------- Tag des Monats (1 - 31)
| ----------- Stunde (0 - 23)
------------- Minute (0 - 59)
Achtung - der cron dameon benutzt die interne Zeit des Betriebssystems
(mit time kann man die nachschauen) NICHT die mit der Zeitzone korrigierte
Zeit der Enigma Oberfläche, dies also beim Einplanen der Jobs
ggf. berücksichtigen
Das add command interface menu bietet derzeit einfach an das rmc.sh um
8:30 ausgeführt wird und dann die enigma crashes aufräumt.
Das Equivalent an das cronmanager shell script übergeben wäre:
/etc/cron/cronmanager.sh add /etc/cron/examples/rmc.sh 30 8
Shutdown um 23:30 wäre dann:
/etc/cron/cronmanager.sh add /etc/cron/examples/slt.sh 30 23
Shutdown in 2 Stunden wäre dann:
/etc/cron/cronmanager.sh delay /etc/cron/examples/slt.sh 120
Um * als eine Zeitvariable zu übergeben, entweder %* benutzen oder
"" da * das default ist wenn kein parameter übergeben wird.
====================================================================
Viel Spass beim Ausführen von cron jobs auf Deiner DM 7025 !
====================================================================
Here comes the English Version of the Documentation ...
====================================================================
HOW-TO-CRONMANAGER
====================================================================
On a PC unpack the downloaded cronmanagerXX.zip with WinZiP
or similar Programm and copy the included cronmanagerXX.tar.bz2
File with FTP in /var/tmp of your Dreambox 7025 (and maybe
READ the readme.txt on your PC !).
Then loggon vial telnet to your Dreambox and excute the follwing
commands OR use Bluepannel manual addon Install if available
in your image.
> cd /
> bunzip2 /var/tmp/cronmanagerXX.tar.bz2
> tar -xvf /var/tmp/cronmanagerXX.tar
> /var/tmp/cronmanager.sh enable
If the image has a blue pannel then you can do the enable there to
if you did an enigma restart after the manual install so that addon
menu shows up.
Don't be scared, the enable and disable will reboot your box at the
end.
Then in games/plugin menu of the Dreambox the Cronmanager menu should
be already showing up.
At the moment there are the following options of cronmanager available
which are more or less self explaining.
list .... lists crontab content
add .... adds command to crontab with time
delay .... adds command to crontab with delay
delete .... deletes the crontab
info .... shows if the cron dameon is running
time .... shows system time used by cron daemon
start .... starts the cron dameon
stop .... stopps the cron dameon
restart .... restarts the cron daemon
reload .... lets the cron dameon reload the crontab
enable .... installs the cronmanager and enables the cron dameon
disable .... deinstalls the cronmanager and removes the cron dameon
reboot .... reboots Dreambox
halt .... halts Dreambox
kill .... restarts enigma
man .... shows the readme.txt of cronmanager
The whole cronmanager is installed at /etc/cron and the crontab
is linke there from /var/spool/cron !
cronmanager is available as addon in games/Plugin menu and as script
cronmanager.sh at /etc/cron
You can test the cronmanager with a few small testsripts which are
placed at /etc/cron/examples:
slt.sh
This is a script for implementing a sleeptimer, at the moment it simply does a
shutdown -h now. Take care, if you plan this too often in cron you will have fun !
rmc.sh
This is a small script which simply removes the enigma crahs dumps at /media/hdd.
For Testing rmc.sh simply create dummy crashes with touch and see them dissapear
regulary when rmc.sh is sheduled:
touch /media/hdd/enigma2_crash_dummy
ls /media/hdd/enigma2_crash_*
(repeat before and after 8:30 - or change the time accordingly)
iup.sh
This is a small script which does an ipkg update & upgrade for upgrading
via the internet with the latest ipkg packages.
fsc.sh
This is a small script which does a reboot with a forced filesystemcheck.
(from time-to-time not bad for your harddisk)
e2r
This is a small example for restarting enigma with init 2 and init 3.
ER Plugin uses this script to re-load timers.xml.
When using the command option, then after the command to be executed
you have to specify the follwoing syntax for the time when it will be executed:
* * * * *
- - - - -
| | | | |
| | | | ----- day of week (0 - 6) (Sunday=0)
| | | ------- month (1 - 12)
| | --------- day of month (1 - 31)
| ----------- hour (0 - 23)
------------- min (0 - 59)
Attention, the cron dameon uses the internal system time (you can
display it with the time option), not the with your
timezone corrected time of the enigma menu interface, please
keep this in mind when sheduling jobs.
The add command in menu interface simply offers /etc/cron/rmc.sh 30 8
which means that it will run everyday at 8:30 and
will then clean the enigma crashes.
The equivalen with the crontabmanager script would be:
/etc/cron/cronmanager.sh add /etc/cron/examples/rmc.sh 30 8
Shutdown at 23:30 would be:
/etc/cron/cronmanager.sh add /etc/cron/examples/slt.sh 30 23
Shutdown in 2 hours would be:
/etc/cron/cronmanager.sh delay /etc/cron/examples/slt.sh 120
For passing * as a timevariable either use %* or "" as this is the default if
no argument is passed !
================================================================
Have fun executing cron jobs on your DM 7025 !
================================================================