executare script intre anumite ore

Ai o întrebare legată de PHP? Incercăm să îi găsim soluţie. Sau poate doar vrei să publici un cod interesant.

Moderatori: Zamolxe, Moderatori


crivion
Senior Member
Mesaje: 781
Membru din: Mar Apr 10, 2007 4:20 pm
Localitate: Somewhere

Mesajde crivion » Lun Aug 18, 2008 11:08 pm


djaxel
PHPRomania Supporter
Mesaje: 8
Membru din: Lun Aug 18, 2008 10:15 pm

Mesajde djaxel » Lun Aug 18, 2008 11:13 pm


joe_black
Average Member
Mesaje: 51
Membru din: Mie Mai 03, 2006 6:19 pm

Mesajde joe_black » Lun Aug 18, 2008 11:40 pm


djaxel
PHPRomania Supporter
Mesaje: 8
Membru din: Lun Aug 18, 2008 10:15 pm

Mesajde djaxel » Mar Aug 19, 2008 12:07 am


Avatar utilizator
mihaitha
Senior Member
Mesaje: 2383
Membru din: Vin Mai 04, 2007 12:40 pm
Localitate: Sibiu
Contact:

Mesajde mihaitha » Mar Aug 19, 2008 10:09 am


djaxel
PHPRomania Supporter
Mesaje: 8
Membru din: Lun Aug 18, 2008 10:15 pm

Mesajde djaxel » Mar Aug 19, 2008 10:40 am


mandriva2007
Senior Member
Mesaje: 254
Membru din: Mar Oct 02, 2007 2:26 pm

re

Mesajde mandriva2007 » Mie Aug 20, 2008 10:10 am

daca scriptul e pe server linux cu crontab * 22-23 * * 1-7 root links http://serverul meu/x.php

x.php contine partea aia dintre if care doresti sa fie rulata daca sunt indeplinite conditiile de ora.si inca inceva e incorect sa spui sa ruleze ce va intre 23- 10 seara ,intre 23 si 22(22 in loc de 10 pentru seara) .nu o sa-ti mearga in veci scriptul asa intre 23 si 22.nu e logic .e ca si cum ai spune nr asta se afla intre [5,4] (Ilogic) si nu intre [4,5] . bun.da mihaita bucata aia de script se rula din crontab.
corect era intre 22 si 23 sau intre 23 si ora 10 a doua zi (cum si a spus defapt)ce mare smecherie.if{(conditie)
executie
}
ei executia o puneai in alt script <?Php
executie
?>
Ultima oară modificat Mie Aug 20, 2008 10:38 am de către mandriva2007, modificat de 2 ori în total.
"It started with lessons with ho I should hate
Listening to everything spoken to me
Now there is a chance that you were just using me
Innocents turned to see your way of life
It's ripping through me everyday
My head keep spinning with the shit that you said
You even had me get down on my knees
Praying for something that I never believed
"
By SEPULTURA

djaxel
PHPRomania Supporter
Mesaje: 8
Membru din: Lun Aug 18, 2008 10:15 pm

Mesajde djaxel » Mie Aug 20, 2008 10:15 am

Ai inteles gresit ,
Vreau ca o anumita bucata de cod php dintr-un fisier sa ruleze doar intre ora 23 si ora 10 ( dimineata ) , in rest vreau ca respectiva bucata de cod sa fie ignorata .

Avatar utilizator
mihaitha
Senior Member
Mesaje: 2383
Membru din: Vin Mai 04, 2007 12:40 pm
Localitate: Sibiu
Contact:

Mesajde mihaitha » Mie Aug 20, 2008 10:16 am

mandriva:
1. esti offtopic pentru ca intrebarea e referitoare la o bucata de cod care sa se execute numai intre anumite ore, n-are nici in clin nici in maneca cu cron-ul.
2. esti offtopic si pentru ca baiatul a primit deja raspunsul asteptat, si se pare ca ii merge.

Data viitoare citeste tot, altfel postezi numai ca sa te afli in treaba (mai exact, postcount).

mandriva2007
Senior Member
Mesaje: 254
Membru din: Mar Oct 02, 2007 2:26 pm

pt djaxel

Mesajde mandriva2007 » Mie Aug 20, 2008 10:29 am

[offtopic] djaxel eu nu-ti dau informatii eronate sa stii.scuza-ma daca nu am inteles exact ce doresti,oricum sa ti minte aia cu crontabu.e f buna pentru orice.(autorulare scripturi )
"It started with lessons with ho I should hate
Listening to everything spoken to me
Now there is a chance that you were just using me
Innocents turned to see your way of life
It's ripping through me everyday
My head keep spinning with the shit that you said
You even had me get down on my knees
Praying for something that I never believed
"

By SEPULTURA

adix
Average Member
Mesaje: 123
Membru din: Mar Oct 02, 2007 11:01 pm

Re: re

Mesajde adix » Mie Aug 20, 2008 10:30 am



Înapoi la “Cod PHP”

Cine este conectat

Utilizatori ce ce navighează pe acest forum: Niciun utilizator înregistrat și 8 vizitatori