PHP - Script continuous execution

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
kirank
Forum Newbie
Posts: 23
Joined: Thu Dec 03, 2009 2:19 am

PHP - Script continuous execution

Post by kirank »

Hi all,
I am in need of good suggestion from PHP Developers.
I want to run background script, which will run 24 hours a day. What i need is the program will connect to a remote SMPP Provider (SMS Gateway), and the gateway will be connected or Alive 24 hours. In that Program in specific interval , the databse will be polled for new entries, if new items the code will take and send the messages. My question is can i use a program to run 24 hours and access database. Is there any overhead in server or database. I want to use Dedicated or VPS Server.

Please help me with your suggestions and possiblities (Errors ) also.

Thanks
User avatar
Darhazer
DevNet Resident
Posts: 1011
Joined: Thu May 14, 2009 3:00 pm
Location: HellCity, Bulgaria

Re: PHP - Script continuous execution

Post by Darhazer »

It can run 24 hours, and overload depends on how the program is written. Usually I put few seconds sleep after each check to the remote database on such programs..
kirank
Forum Newbie
Posts: 23
Joined: Thu Dec 03, 2009 2:19 am

Re: PHP - Script continuous execution

Post by kirank »

Okay,

Actually my main aim is to be connected live with another host with a specifi port address. So that it can give some data to the application. Not in every second. But neds to be live online 24 hours. I am haivng a dedicated server. Is there is any issue if we try database checking in every 1 minute intervl.

Thanks
Post Reply