Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

Run Async Task in background

as in example $ php app/cli.php main test world universe

is there a "phalcon way" to execute a task as a background job from Controller? or to use

    shell_exec('php app/cli.php main test world universe')


Queuing is probably the closest to what you're after. Currently only Beanstalk is supported (which runs as a daemon).

Your controller would put a job in the queue, and the workers that you have running separately would process them when received.

Yea, i would definitely use beanstalkd queue too.

What is best beanstlkd lib that I could create something like

What you mean ? Phalcon already has stuff like this, just mix phalcon cli and queue.