DYI: Scheduling Cron jobs in the multi-server system

Note that the code below is only a concept, not a full implementation, so it is not tied to any framework.Our full implementation is a bit more robust, it contains task caching, queuing (using RabbitMQ), saving some task statistics like execution time and more, but this is not a subject of this article.SummaryEven though the solution is using three separate parts (Lambda function, Triggering service and the PHP command executing tasks) the implementation is very simple..The essence of the code is less then 100 lines and it works just fine..You could probably simplify it to get rid of the PHP part, but as we already had the application dashboard developed using Yii framework it was an obvious way for us.I’m sure there are some drawbacks of this solution, but for a small projects that you still want to run on multiple servers it will do the trick.. More details

Leave a Reply