Jump to content

[SOLVED] continuously running process


calabiyau

Recommended Posts

Not sure if this is the right place to post but nowhere else seems to fit.  Would it be  a high load on a server to have a php process run from the executable, continuously looking for existence of files in a folder and processing them if they are there?  Just an endless loop that checks for the existence of the files.  If they are there, do something with them, if not keep looping?  It is not a web accessible application but something for server admin.  Anybody have experience with such things. 

Link to comment
Share on other sites

The server load depends on what really your process is doing. If it is doing something very resource incentive, than it will slow your server down. You might wanna use cron to run the process after every 10 minutes.

Link to comment
Share on other sites

Yeah I want this to be very real time if possible.  the thing is, most of the time there will be no processing going on at all, just checking for the existence of files...most often won't find any, therefore just keep looping and checking the folder.  When it finds a file, it has to open, read about 1 line of contents and maybe write to one additional file with that information.  but maybe I can CRON it every couple of minutes instead.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.