Run symfony action from console
I have two action in my symfony 2 controller. CrawlerBundle:Index:index, CrawlerBundle:Index:update. I need run index action from console. How can I? I think it starts with php app\console ...
Help me please.
By only declaring a controller as a service, you are able to call your actions with :
$ php app/console phax:action controller action -p param1:value1 -p param2:value2
There is an example with a cron to delete old comments:
$ php app/console phax:action comment deleteOldComments -p date:2013-06-05 Old comments have been deleted: 18 $