Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[gelöst] cron tut nicht was es soll
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German)
View previous topic :: View next topic  
Author Message
Jean-Paul
Guru
Guru


Joined: 13 Apr 2009
Posts: 300

PostPosted: Sat Nov 10, 2012 10:13 pm    Post subject: [gelöst] cron tut nicht was es soll Reply with quote

Ich hab hier ein einfaches dcron laufen.
Was ich möchte ist, dass jede Stunde die Einträge in cron.hourly abgeabreitet werde.
Um zu testen ob dies auch geschied hab ich ein Script in cron.hourly eingetragen
Quote:
echo "crontest: $(date)" >> /tmp/crontest 2> /tmp/crontest.stderr

und als Ergebnis erhalte ich
Quote:
crontest: Sa 10. Nov 18:00:01 CET 2012
crontest: Sa 10. Nov 20:00:01 CET 2012
crontest: Sa 10. Nov 22:00:01 CET 2012

Das Script wird also alle zwei Stunden ausgeführt.
In der crontab hab ich folgendes stehen
Quote:
0 * * * * /usr/sbin/run-crons /etc/cron.hourly


Nach Recherche in Google und lesen unzähliger Seiten ist der crontab-Eintrag richtig.

Hat jemand eine Idee warum nur alle zwei Stunden ?

Jean-Paul


Last edited by Jean-Paul on Sun Nov 18, 2012 12:57 pm; edited 1 time in total
Back to top
View user's profile Send private message
tuam
l33t
l33t


Joined: 04 May 2004
Posts: 765
Location: CGN, Germany

PostPosted: Sat Nov 17, 2012 10:09 pm    Post subject: Re: cron tut nicht was es soll Reply with quote

Jean-Paul wrote:
Hat jemand eine Idee warum nur alle zwei Stunden ?

Erste Idee: Laufen die Jobs länger als eine Stunde? Müsste man daran erkennen, dass kurz vor der ungeraden Stunden noch /usr/sbin/run-crons läuft.

FF,
Daniel
_________________
Logic clearly dictates that the needs of the many outweigh the needs of the few. - Spock
The needs of the one outweigh the needs of the many. - Kirk
I refuse to let arithmetic decide questions like that. - Picard
Back to top
View user's profile Send private message
Jean-Paul
Guru
Guru


Joined: 13 Apr 2009
Posts: 300

PostPosted: Sun Nov 18, 2012 12:57 pm    Post subject: Reply with quote

Danke für die Antwort.

Ich bin einfach von falschen Voraussetzungen ausgegangen.
Die Distri die ich bisher genutzt hatte, verwendet eigene Scripts so dass das komplett Handling anders wird.

Die Lösung ist - ganz einfach - die vorgegebene /etc/crontab zu verwenden.
Dort müssen nur die Zeiten geändert werden und dann tut dcron auch was es soll.

Jean-Paul
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum