I have a PHP file that always listens to a socket, I must have a tab opened in my browser to execute that file, Is there a way to define some PHP files to apache to execute automatically when apache starts?
2
-
Heard of cron jobs..? stackoverflow.com/questions/18737407/…웃웃웃웃웃– 웃웃웃웃웃2014-12-18 05:39:41 +00:00Commented Dec 18, 2014 at 5:39
-
I want to run just one time when apache starts, it has a while and it doesn't need to run periodical with cron jobs @웃웃웃웃웃mohammad falahat– mohammad falahat2014-12-18 05:47:30 +00:00Commented Dec 18, 2014 at 5:47
Add a comment
|
1 Answer
I would recommend you to check this article: http://webadvent.org/2009/daemonize-your-php-by-sean-coates
It recommends to install supervisord to make sure that one instance of your php script is running. It's something that you would make frequently when working with async job queues.