Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> Cron
Pronigo
post
Post #1





Grupa: Zarejestrowani
Postów: 117
Pomógł: 0
Dołączył: 8.05.2005
Skąd: Gdańsk

Ostrzeżenie: (10%)
X----


Szukalem i nie znalazlem wiec sie pytam...
Chce co sekunde pobrac rekord z bazy danych, trzeba wykorzystac crona, ale nie mam zielonego pojecia jak za to sie zabrac.

Moj serwer stoi na Linuxie - apache 1.3.34 (Unix). Gdzie ustawia sie tego crona i co powinienem wpisac.

Pzdr.
Go to the top of the page
+Quote Post
ave
post
Post #2





Grupa: Zarejestrowani
Postów: 117
Pomógł: 2
Dołączył: 29.01.2004
Skąd: Rz-ów

Ostrzeżenie: (0%)
-----


http://pl.docs.pld-linux.org/uslugi_cron.html
Go to the top of the page
+Quote Post
Pronigo
post
Post #3





Grupa: Zarejestrowani
Postów: 117
Pomógł: 0
Dołączył: 8.05.2005
Skąd: Gdańsk

Ostrzeżenie: (10%)
X----


Cron dziala, wykonuje mi plik, ale za kazdym jego wykonaniem dostaje maila:

Kod
Failed loading /usr/local/Zend/lib/ZendExtensionManager.so:  /usr/local/Zend/lib/ZendExtensionManager.so: cannot open shared object file: No such file or directory
X-Powered-By: php/4.4.2
Content-type: text/html


Polecenie crona:
Kod
/usr/bin/php /home/pronigo/public_html/cron.php
Go to the top of the page
+Quote Post
kszychu
post
Post #4





Grupa: Przyjaciele php.pl
Postów: 2 712
Pomógł: 23
Dołączył: 27.10.2003
Skąd: z kontowni

Ostrzeżenie: (0%)
-----


Daj na końcu 1> /dev/null nie będzie wysyłał maili


--------------------
"Coś się kończy, coś się zaczyna." Andrzej Sapkowski
Go to the top of the page
+Quote Post
dr_bonzo
post
Post #5





Grupa: Przyjaciele php.pl
Postów: 5 724
Pomógł: 259
Dołączył: 13.04.2004
Skąd: N/A

Ostrzeżenie: (0%)
-----


Tu chodzi chyba o nie dostawanie TAKIEGO maila
"Failed loading /usr/local/Zend/lib/ZendExtensionManager.so"

nie wiem co to za rozszerzenie (google wskazuje na Zend Optimizer) -- moze masz cos zle zainstalowane ZO / php.ini.


--------------------
Nie lubię jednorożców.
Go to the top of the page
+Quote Post
mcstar
post
Post #6





Grupa: Zarejestrowani
Postów: 14
Pomógł: 0
Dołączył: 8.07.2003

Ostrzeżenie: (0%)
-----


Nie wiem może się myle ale jak dla mnie to dziwnie masz to polecenie dla cron'a. Ja używam wywołania jakie kiedyś doszukałem się w instrukcji dla phpAdsNew - i jak do tej pory nigdy z nim nie było problemu winksmiley.jpg

Cytat
Based on which tool your server supports add one of the following lines to the cron.txt
file:

# if your server supports curl:
0 * * * * curl -s -o /dev/null http://your.server.name.here/phpAdsNew/mai...maintenance.php
# if your server supports fetch:
0 * * * * fetch -o /dev/null http://your.server.name.here/phpAdsNew/mai...maintenance.php
# if your server supports lynx:
0 * * * * lynx > /dev/null -dump http://your.server.name.here/phpAdsNew/mai...maintenance.php
# if your server supports wget:
0 * * * * wget -q -O /dev/null http://your.server.name.here/phpAdsNew/mai...maintenance.php



To cytat z tej instrukcji winksmiley.jpg Podobnie budowałem zolecenie do obsługi IPB też działało - może Tobie też pomoże.

P.S.
U mnie na serwerze obsługiwana jest wersja dla wget.


--------------------
Pozdrawiam serdecznie
Marcin
Go to the top of the page
+Quote Post
acztery
post
Post #7





Grupa: Zarejestrowani
Postów: 945
Pomógł: 7
Dołączył: 15.03.2005
Skąd: katowice

Ostrzeżenie: (0%)
-----


cron chyba nie moze co sekunde minimum to co minute
Go to the top of the page
+Quote Post
huntercs
post
Post #8





Grupa: Zarejestrowani
Postów: 94
Pomógł: 0
Dołączył: 6.02.2005

Ostrzeżenie: (0%)
-----


dokładnie, crond odpala się co minutę, i jest to minimum jakie można ustawić
* * * * * - co minutę, jak zapisałeś żeby pobierał co sekunde? rolleyes.gif


--------------------


Go to the top of the page
+Quote Post
acztery
post
Post #9





Grupa: Zarejestrowani
Postów: 945
Pomógł: 7
Dołączył: 15.03.2005
Skąd: katowice

Ostrzeżenie: (0%)
-----


huntercs co sekunde to nie możliwe bo

1-sza kolumna (zakres 0-59) oznacza minuty.

2-ga kolumna (zakres 0-23) oznacza godzinę.

3-cia kolumna (zakres 0-31) oznacza dzień miesiąca.

4-ta kolumna (zakres 0-12) oznacza miesiąc. (0 i 1 to styczeń)

5-ta kolumna (zakres 0-7) oznacza dzień tygodnia (0 i 7 to niedziela)


np 30 * * * * backup.sh

co 30 min ....

AHA


Mcstar jak to:

Kod
Based on which tool your server supports add one of the following lines to the cron.txt
file:

# if your server supports curl:
0 * * * * curl -s -o /dev/null http://your.server.name.here/phpAdsNew/mai...maintenance.php
# if your server supports fetch:
0 * * * * fetch -o /dev/null http://your.server.name.here/phpAdsNew/mai...maintenance.php
# if your server supports lynx:
0 * * * * lynx > /dev/null -dump http://your.server.name.here/phpAdsNew/mai...maintenance.php
# if your server supports wget:
0 * * * * wget -q -O /dev/null http://your.server.name.here/phpAdsNew/mai...maintenance.php


co sekunde uruchamia coś to ja jestem Święty ...

to jest do uruchomiana co godzine ...

Ten post edytował acztery 13.04.2006, 00:51:03
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 20.08.2025 - 20:10