If you are reading this article probably you already know what is Celery but for who think that it is something to eat I will give you a definition.Celery is an asynchronous task queue/job queue based on distributed message passing developed in python.

If your using Celery for your back-office tasks will be very nice to run some tasks after an action performed on the front end of your web site, like an user action.
If your web front end is wrote in PHP there is an easy and useful way for do it trough Rabbit MQ, the message broker used by celery.
What we can do is simply put a message, that Celery workers can consume, in Rabbit MQ trough a pure AMQ PHP library called AMQPHP .
You can download this implementation of the AMQ 0.9.1 protocol from the gitHub project’s page.

Follow the instruction for generate the code in the readme file and simply include it in your project.

When you are sure that the library works and is able to publish message on Rabbit MQ you can use the class provided at the end on this post for put message on the broker ready for be consumed from celery workers.
This class offer a method called runCeleryTask($task,$arguments) that allow you to run a specific registered task with N arguments.
If I have a celery registered task called package.exampleTask.dojob that accept a string and an Integer I can schedule it in this way

Here is the class that do the “Dirty Job” is quite easy and simple, I hope that this could help someone.
You don’t need to declare exchange and queue again, this are supposed to be already declared by celery.