Connecting Tech Pros Worldwide Help | Site Map

How to add task in queue and run them at Back end through PHP?

Newbie
 
Join Date: Sep 2009
Posts: 13
#1: Sep 30 '09
Site user can start some task by submitting some information. But he don't stay their to complete that task. I have to add the task in queue and done this at back end and after completion of task I have send the email; to that user.

For example, consider some image uploading task, user give all required information and say 'Submit' then only message should displayed "Your task is added at queue and after completion we will send you an email notification." User may logout from there. And his task should added at queue and I have to done this at back end.

Really appreciated if you have any idea regrading this kind of problem.
Thanks a lot.
TheServant's Avatar
Expert
 
Join Date: Feb 2008
Location: Australia
Posts: 913
#2: Sep 30 '09

re: How to add task in queue and run them at Back end through PHP?


You can look at prioritizing MySQL tasks, but that is more immediate.
Cron jobs might also work with a periodic running of tasks for users, but that's not exactly what you want.

I must admit, I am a little concerned that your script is going to take long enough for someone to leave their computer and wait for an email. If it is uploading, the user has to have their computer on while the upload is taking place. If it is executing something, can you not reduce it so it can be done quicker?
Reply