We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

CLI

Would be very nice to get example application.

Big applications always have background workers. Easiest way is to implement special controllers and call it by cron for example. But it is very bad.

I saw https://docs.phalcon.io/en/0.8.0/reference/cli.html but there is something that need to be included.



98.9k

We need to improve such component, here is a by his author explaining how it works



4.1k

' here is a by his author explaining how it works' you forgot a link?



1.6k
edited May '15

Sorry for upping an old thread but I guess it is better than making a copy....

On the forum page it says that scripts must be enabled in the background

A PHP client to deliver e-mails must be enabled in background: php scripts/send-notifications-consumer.php &

It is clear that script "send-notifications.php" calls methods from SendSpool class and they get jobs from Beanstalk server.

My question is - how and how often are these scripts executed?

I presume these scripts are run periodically via cronjobs?

How would you execute this "send-notifications.php" script from prompt (or from cronjob)?

Like this: usr/bin/php /var/www/forum/app/scripts/send-notifications.php ???