Re: Time
| From: | Chris Chabot | Date: | Sat, 31 Mar 2001 03:43:41 +0000 |
| Subject: | Re: Time | ||
| References: | 1 2 3 | Groups: | php.gtk php.windows |
| Request: | Send a blank email to php-gtk+get-1230@lists.php.net to get a copy of this message | ||
No both time and sleep use seconds.
see http://www.php.net/manual/en/function.sleep.php
and http://www.php.net/manual/en/function.time.php
respectivly.
if you want to use milliseconds, you need to use usleep
see http://www.php.net/manual/en/function.usleep.php
just nitpicking my last few awake moments of the day :)
-- Chris
Steph wrote:
> Seconds? I thought milliseconds?
>
> Oh well, suck it and see, Josh!
> ;)
>
> ----- Original Message -----
> From: "Chris Chabot" <chabotc@reviewboard.com>
> To: "Josh Seward" <js389599@ohiou.edu>
> Cc: <php-windows@lists.php.net>; "php-gtk" <php-gtk@lists.php.net>
> Sent: Saturday, March 31, 2001 4:31 AM
> Subject: Re: [PHP-GTK] Time
>
> Umm the obvious reply would be to go to download.com and browse to see if they have a shareware
> version of a cron like application, i am sure they do... i remember seeing some of those.
>
> Otherwise, code a simple php or c or delphi or visual basic app that only does
>
> while (1)
> sleep(60*60);
> exec('application')
> end
>
> Can't be that hard to write right? :)
> or even if you wanted it -on- every hour and not every hour, just do a
> if ( frac (time() / (60*60) ) == 0) {
> exec('application')
> }
> (ie if the dividable time / 'seconds in hour' has no fraction (behind the . or ,
> depending on locality, its on the hour)
>
> I realy hope this wont become a windows support mailing list though, thats kinda outside of the
> scope of php-gtk? :)
>
> -- Chris
>
> Josh Seward wrote:
>
> > Hello,
> >
> > Is there a way to have php run a script at a certain time? What I really need is something
> > like cron on unix systems. I would use windows scheduler but it only goes by days. I ned to run this
> > once every hour.
> >
> > P.S. To let everyone how helped me before. I can now send commands to an outside program I
> > am running w/ the fsockopen command. This is after I open the prog. with popen. Thank you all for
> > your help., especially Steph and Micheal. Your efffort and advice is much appriciated. If your ever
> > in Athens Ohio the first round is on me :-)
>
> --
> 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