Re: Sleep Function
| From: | Josh Seward | Date: | Mon, 12 Mar 2001 21:18:59 +0000 |
| Subject: | Re: Sleep Function | ||
| References: | 1 | Groups: | php.gtk |
| Request: | Send a blank email to php-gtk+get-728@lists.php.net to get a copy of this message | ||
Thanks for the help!
Could you please explain or show how the 'at' command is used? I am not sure
how to set up or even where to set this command up. I have never heard of
it.
Thank you,
Josh Seward
----- Original Message -----
From: <jasonr@argia.net>
To: <php-gtk@lists.php.net>
Sent: Monday, March 12, 2001 2:44 PM
Subject: Re: [PHP-GTK] Sleep Function
> you might look at doing it with external or system utilities that are
already available. I'm not sure what platform you are on, but the cron
daemon on unix systems provides this functionality. possibly using the 'at'
command on windows platforms could work, having the program set a timer to
call itself again before it exits.
>
> > I have been having tourble with boht the sleep and usleep function. I
can only get them to 40 sec and then they will cut off. This is even true
with the micro seconds in the usleep function.
> >
> > Here is my code:
> >
> > do{
> > $hour = date("G");
> > $minute = date("i");
> > $sec = date("s");
> > print "$hour:$minute:$sec\n";
> > usleep(100); // or us sleep(1);
> > }while($minute != "00");
> >
> > This will stop on the 40th sec. Its not the 40th loop becuase usleep
loops hundreds of times but only quite on the 40th second.
> >
> > I am trying to set up a program to run every hour and this loop
finds the hour on the hour then continues to run.Incase someone starts the
script say at 7:30. It will wait till 8:00 to run the rest of the script. If
there is a better way to do this please tell!!!!
> >
> > Thanks,
> >
> > Josh Seward
> > js389599@ohiou.edu
>
> --
> PHP GTK Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-gtk-unsubscribe@lists.php.net
> For additional commands, e-mail: php-gtk-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>