RofaelEmil
RofaelEmil

Reputation: 85

Task Queue- PHP

how to make a "Task Queue" using PHP? I know how to store and create the queue. The problem is in making it executed on Server-side without hanging the users session. I have no permission to use the server. I only upload my files on it.

Upvotes: 2

Views: 718

Answers (1)

HappyTimeGopher
HappyTimeGopher

Reputation: 1387

I would have suggested using crontab if you had server access.

What I'd probably do is create another script that when called via HTTP processes say, 10 items. Then call this script on a regular basis yourself, or better, from another server where you can setup a cronjob.

However, if you're talking about having this work done straight after the users HTTP request, then in PHP you can use ignore_user_abort(). There are multiple examples on the PHP manual page you can use.

Upvotes: 1

Related Questions