On Oct 31, 2006, at 2:48 AM, Ahmad Al-Twaijiry wrote:
yes, I think you can call it ,semi-real-time monitoring
because we want the script when it run it should read some records in
database and update other records
That's kind of vague. I'm not able to give better advice without
more infor
yes, I think you can call it ,semi-real-time monitoring
because we want the script when it run it should read some records in
database and update other records
On 10/31/06, Ed Lazor <[EMAIL PROTECTED]> wrote:
On Oct 30, 2006, at 10:26 AM, Ahmad Al-Twaijiry wrote:
> is it possible to link the
On Oct 30, 2006, at 10:26 AM, Ahmad Al-Twaijiry wrote:
is it possible to link the script to my php interface (the one that
the users is using it) and if the php interface page will run the
script (IN background) if it didn't run for the last 30 seconds ? I
see this is very hard and almost impos
On Mon, October 30, 2006 11:29 am, Ahmad Al-Twaijiry wrote:
> I have a script that I want it to run every 30 seconds, the problem is
> that cronjob can run every 1 minute only, do you have any solution ?
Run a script that never quits with:
http://php.net/usleep
while (true){
//your script here
On Mon, 30 Oct 2006 21:26:29 +0300, Ahmad Al-Twaijiry wrote:
The "right" way to do this, as others have mentioned, is with a
daemon. Having said that...
>is it possible to link the script to my php interface (the one that
>the users is using it) and if the php interface page will run the
>script
Or, you could run two scripts every minute ... one that starts
immediately, and one that sleeps for 30s before starting.
-- Mitch
Dave Hamber wrote:
You could run the script as a daemon. man daemon.
The sloppy way of running the script every 30 seconds would be to use
sleep(30), but that w
Ahmad Al-Twaijiry wrote:
Hi everyone,
I have a script that I want it to run every 30 seconds, the problem is
that cronjob can run every 1 minute only, do you have any solution ?
Use atd.
--
John C. Nichel IV
Programmer/System Admin (ÜberGeek)
Dot Com Holdings of Buffalo
716.856.9675
[EMAIL P
You could run the script as a daemon. man daemon.
The sloppy way of running the script every 30 seconds would be to use
sleep(30), but that would cause the script to run at 30 seconds +
execution time.
If you make a loop like this you could get around that:
$t=time()+31;
while(true){
You can still use Cronjob with 1 min setting and in use 2 processes
1. Run script immediately
2. Sleep for 30 sec and then run the script
you can use exec/shell_exec functions with output redirected to soem file so
that It will run in background.
That way you have one process running at 0 sec a
Thank you all
but the problem is that I don't have root access to the server to
create daemon :)
so if I just run the script in background with 30 seconds sleep and
someone reboot the server (or the script dies for any reason ) I will
lose my process :)
any other ideas ?
is it possible to li
Sorry, slight adjustment, make that $t=time()-31; in the first line so
that the script runs immediately.
> You could run the script as a daemon. man daemon.
>
> The sloppy way of running the script every 30 seconds would be to use
sleep(30), but that would cause the script to run at 30 seconds
I've never tried this myself, but how about having the cron job kick
off a script which will run script A and script B
Script A runs right away, and script B runs after a delay of 30
seconds ( usleep(30* 100) )?
-James
On Oct 30, 2006, at 12:29 PM, Ahmad Al-Twaijiry wrote:
Hi everyone,
er 31, 2006 1:29 AM
To: PHP
Subject: [PHP] Run script every 30 seconds
Hi everyone,
I have a script that I want it to run every 30 seconds, the problem is
that cronjob can run every 1 minute only, do you have any solution ?
--
Ahmad
http://www.v-tadawul.com
--
PHP General Mailing List
I have a script that I want it to run every 30 seconds, the problem is
that cronjob can run every 1 minute only, do you have any solution ?
Set the script up as a 2 iteration loop with sleep( 30 ) at the end of the
first iteration. Or something like that...
thnx,
Chris
--
PHP General Mail
Hi everyone,
I have a script that I want it to run every 30 seconds, the problem is
that cronjob can run every 1 minute only, do you have any solution ?
--
Ahmad
http://www.v-tadawul.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
15 matches
Mail list logo