Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

shumitsu's avatar

exec required for scheduler to work

I uploaded my Laravel application to shared hosting and creating a cron entry as advised in the documentation to schedule the laravel tasks.

It seemed that the cron job was not running, but looking in the logs, I saw the following: [2015-07-02 11:45:02] local.ERROR: exception 'ErrorException' with message 'exec() has been disabled for security reasons' in /home/thetrawl/public_html/ottawadetours.ca/app/vendor/laravel/framework/src/Illuminate/Console/Scheduling/Event.php:137

So it seems that exec has to be enabled for scheduling to work.

If this is the case, does anyone know of any work-arounds? It might also be a good idea to indicate this in the documentation.

0 likes
2 replies
shumitsu's avatar

This is shared hosting so I'm not too sure if they'll change it. I managed to make it work by not scheduling the command and running it normally via cron.

Please or to participate in this conversation.