Running console command from web application

Has anyone tried to run a console command from web app?

I have few console commands that part of job sequence run by cron. Now I need a functionality to allow user run these job sequences on demand using the web app. Thoughts please.

I would start here:

Yes i use exec too to run some commands… error reporting can be a pain though. Epsecially if something goes wrong with the process.

Thoughts are inline.

Thanks will do it with exec. My older scripts were using PHP active records that can be run both at command line and web-server. As well the process output could be captured in Yii’s ajax call. However, it has it’s own set of model files.

If it is about “normal” php functionality like your active record models, look into CConsoleCommand you can create some custom yii commands :)

Yes :),

I had to rewrite.