I had also problems with the Zend optimzer which worked only over the apache webserver somehow, so I used this command in my cron table which it runs every 2 minutes with batch processing enabled:
...