Dec 24, 2025 - 04:04 AMDeutsch | English
Hello unlogged user [ Register | Log in ]

Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
Dietmar
Post subject: Xplanet Wolkenbilder automatisch aktualisieren  PostPosted: Apr 18, 2009 - 12:12 PM



Joined: Aug 03, 2004
Posts: 181

Hallo
hab mir mal Xplanet aufgespielt - als Hintergrundbild - läuft auch soweit, nur die automatische Aktualisierung des Wolkenbilds bekomme ich nicht hin...
Hab mir das dafür notwendige Script geladen und unter /usr/local/bin abgelegt.

Mit dem Befehl crontab -e soll der Eintrag 0 * * * * python /usr/local/bin/download_clouds.py &>/dev/null in der crontab erzeugt werden.
Verzeichnis ist anlegt wo das aktuelle Wolkenbild abgelegt werden soll. Kopiere ich hier ein manuell neu heruntergeladenes Bild hinein, aktualisiert sich das Hintergrundbild auch.

Dies soll aber per Cronjob laufen, dem ist bei mir aber nicht so- meine Corntab sieht so aus:
# /etc/crontab: system-wide crontab
# Unlike any other crontab you don't have to run the `crontab'
# command to install the new version when you edit this file
# and files in /etc/cron.d. These files also have username fields,
# that none of the other crontabs do.

SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin

# m h dom mon dow user command
17 * * * * root cd / && run-parts --report /etc/cron.hourly
25 6 * * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )
47 6 * * 7 root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly )
52 6 1 * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.monthly )
#

Hier will ich jetzt nicht mit meinem Halbwissen etwas reinschreiben..

Ist zwar nur eine Spielerei aber wäre schön wenn das Ding laufen würde. Kennt sich jemand damit aus??
Danke im voraus

_________________
Gruß
Dietmar
 
 View user's profile Send private message  
Reply with quote Back to top
blauweiss
Post subject:   PostPosted: Apr 19, 2009 - 12:52 PM



Joined: Mar 12, 2005
Posts: 368

Kenne das Prg Xplanet nicht, aber muß es unbedingt ein Cronjob sein?
Ein bash-Befehl als Endlosschleife im Hintergrund sollte es doch auch tun.

Code:
x=0; while [ $x -eq 0 ]; do sleep 60 && python /usr/local/bin/download_clouds.py; done &

Vorteil: Es wird nicht als root ausgeführt (könnte man wahrsch. anders einstellen)
und du kannst es per
Code:
kill -9 angezeigte_PID
beenden, cronjobs werden mit der Zeit leicht vergessen...

_________________
Gruss an alle Kanotix-Fans, blauweiss
 
 View user's profile Send private message  
Reply with quote Back to top
retabell
Post subject:   PostPosted: Apr 19, 2009 - 03:46 PM



Joined: Sep 04, 2006
Posts: 285

hi

Code:
0 * * * * python /usr/local/bin/download_clouds.py &>/dev/null


heisst wohl zur nullten Minute auführen,
kannst also auch ein script in /etc/cron.hourly
anlegen.

Code:
*/7 * * * * root /usr/bin/cimon_status
*/16 * * * * dein_username fetchmail >& /dev/null
*/5 * * * * root /usr/local/bin/import-new-packages.sh

oder ein Eintrag in /etc/crontab
1. Beispiel */7 alle 7 Minuten ausführen
2. Beispiel */16 alle 16 Minuten ausführen

Du kannst (solltest) auch Deinen usernamen eintragen
um den Job nicht als root auszuführen.

Gruss retabell
 
 View user's profile Send private message  
Reply with quote Back to top
Dietmar
Post subject:   PostPosted: Apr 21, 2009 - 09:16 AM



Joined: Aug 03, 2004
Posts: 181

Hallo blauweiss - Hallo retabell

erstmal danke für eure Zeit....
den Eintrag für Crontab hab ich aus einer Anleitung: (wen es interessiert: http://www.winluxboard.de/showthread.php?t=10512)

Blauweiss: bin nicht so ein Experte: soll ich diesen Befehl einfach per Konsole ausführen? (Bash verstehe ich so) - würd das dann mal so ausprobieren.
Das Verzeichniss und Datei für Wolkenbilder ist momentan mit root-Rechten versehen - aber das kann ich ja noch ändern.

Da der Rechner eh rund um die Uhr läuft wäre das bei eventuellen Neustarts der Batchbefehl kein Aufwand.

_________________
Gruß
Dietmar
 
 View user's profile Send private message  
Reply with quote Back to top
blauweiss
Post subject:   PostPosted: Apr 23, 2009 - 06:05 PM



Joined: Mar 12, 2005
Posts: 368

Ja, du führst diesen Befehl in der Konsole aus
Dietmar wrote:
Kopiere ich hier ein manuell neu heruntergeladenes Bild hinein, aktualisiert sich das Hintergrundbild auch.

Dann wechsle zuerst in dieses Verzeichnis und ruf erst dann den Befehl auf,
wenns nicht klappt versuchs mal mit @retabells Post.

Dein Link hat mich neugierig gemacht, hab mir xplanet auch mal installiert.
Ein sehr interessantes Programm...

Edit: 26,04 ...so das ich mal versuche, eine Anleitung zu schreiben:
http://www.kanotix.de/PNphpBB2-viewtopic-t-25733.html

_________________
Gruss an alle Kanotix-Fans, blauweiss
 
 View user's profile Send private message  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT + 1 Hour
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2007 The PNphpBB Group
Credits
 
Deutsch | English
Logos and trademarks are the property of their respective owners, comments are property of their posters, the rest is © 2004 - 2006 by Jörg Schirottke (Kano).
Consult Impressum and Legal Terms for details. Kanotix is Free Software released under the GNU/GPL license.
This CMS is powered by PostNuke, all themes used at this site are released under the GNU/GPL license. designed and hosted by w3you. Our web server is running on Kanotix64-2006.