Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

running php script ever x minutes

Status
Not open for further replies.

thepain009

Technical User
Oct 22, 2005
42
US
Hi,

I need to make a script execute every 60 seconds. I know that it is possible if the website with the script is open. But, is it possible to do that without the website open?

Thank you in advance
 
If you're on a linux server google for "cron job".
 
you don't need to use vb at all... php can be run from the command line, so all your scheduled task has to do is call "php.exe c:\path\to\my\file.php"



-jeff
try { succeed(); } catch(E) { tryAgain(); } finally { rtfm(); }
i like your sleeves...they're real big
 
Ohh, that works too :p However it makes the black cmd window appear, which can get slightly annoying when using the computer that the server is on.
 
can i just ask a question please jemminger. would the command "php.exe c:\path\to\my\file.php" go into a batch file and then the batch file fun from task scheduler? I am going to set one up but not sure how. thx

Age is a consequence of experience
 
yes you can put it in a batch file and call the batch file from scheduler, or you can just put "php.exe c:\path\to\my\file.php" in the "Run:" line. you might also have to put the document location "c:\path\to\my" in the "Start in" line as well

-jeff
try { succeed(); } catch(E) { tryAgain(); } finally { rtfm(); }
i like your sleeves...they're real big
 
thx, i will give it a go :~)

Age is a consequence of experience
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top