How to write asynchronous web service run in background php -


In order to write the background processing web service to the IP which requires running in the background, the user also closes the browser Has it been using PHP?

More info

Yes im working on symphony / php on big web projects (wage roll), it needs to be processed every month when payroll users now And click on the process button. Then payroll should be processed without the Apache server time. To do this I hope that the asynchronous web service should be run in the background.

As the commentator said, you should be able to use these types of problems because it is best However, you need to launch your job on a user's click. Here's what I use:

  1. Create a line in a table, create a line in a table, or create a file with the necessary parameters to perform the task. Actually, he says to Cron, 'Hey, you need to launch work.'
  2. Set up a cron job to take care of that row / file every minute, and if the line / file is found, launch the task. Delete the file before launching the function, or it may be parallel function.
  3. If your user tells you when payroll has been done, create another row / file to show that the cron has expired, and your user page with javascript Refresh in 30 seconds / 1 minute, and when the new row / file is found, automatically refresh the refresh, and display the appropriate output / notification message.

Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -

python - referencing a variable in another function? -