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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PHP script run as a service?

Status
Not open for further replies.

jet042

MIS
Dec 23, 2002
258
US
I'm trying to create a script that would run as a service on a Windows Server 2003 machine. I have seen the PEAR class to create deamons on a Linux box, but I didn't see anything to do with Windows. Is this even possible, or do I need to look at doing it in a different language?
 
not quite sure what that means in the context of a php script. what do you want it to do that is 'service' oriented?

anyway - why not set up a cron job (scheduled task in windows) to fire at particular times or intervals.

or if you really need to run the script as a service then use srvany.exe and instsrv.exe both from the win resource kit and also freely downloadble from the web.
 
I just found links about instsrv and srvany and was reading through what I could find about how to use them.

Basically, I have a script that connects to a socket on our phone system and reads the SMDR data. It then takes that information and puts it into a database that we can run reports off of. It works, but when the server re-boots I have to manually re-start the script. I want to install the script as a service so that it always runs and the OS can handle restarting it automagically.
 
sounds much easier to use a scheduled task. you can set the task up to run as admin (or another user) and to run whether or not a user is logged in.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top