View previous topic :: View next topic |
Author |
Message |
blackarib -
Joined: 19 Jun 2004 Posts: 48
|
Posted: Mon Jan 03, 2005 10:11 pm Post subject: cli version of php |
|
|
i am writing a script to use php on the command line but is there any function that can make the processing wait/pause for a given length of time. I would rather not make the script do something to make it take time to complete, it will be a continuously looping script but i only want it to repaet every 2 minutes. Is there any way? (cpu time is important) |
|
Back to top |
|
 |
admin Site Admin
Joined: 03 Mar 2002 Posts: 1332
|
Posted: Mon Jan 03, 2005 10:40 pm Post subject: Re: cli version of php |
|
|
blackarib wrote: | i am writing a script to use php on the command line but is there any function that can make the processing wait/pause for a given length of time. I would rather not make the script do something to make it take time to complete, it will be a continuously looping script but i only want it to repaet every 2 minutes. Is there any way? (cpu time is important) |
The function is sleep(2) .
See http://www.php.net/sleep for more information. |
|
Back to top |
|
 |
blackarib -
Joined: 19 Jun 2004 Posts: 48
|
Posted: Mon Jan 03, 2005 11:01 pm Post subject: |
|
|
This does not seem to do anything, it doesn't wait at all! |
|
Back to top |
|
 |
blackarib -
Joined: 19 Jun 2004 Posts: 48
|
Posted: Mon Jan 03, 2005 11:08 pm Post subject: |
|
|
Sorry, my coding mistake! |
|
Back to top |
|
 |
|