Support the ongoing development of Laravel.io →
posted 10 years ago
Configuration

I'm trying to setup a cron job to run a custom Laravel command, however, on my production server php runs as cgi-fcgi and therefore App::runningInConsole() returns false (which checks if the sapi is "cli"). Because of this, my custom command is not defined when running "php artisan list" via the command line (and therefore also when the cron job runs).

Can I override App::runningInConsole() in bootstrap/start.php (or somewhere else), and if so, how would I go about doing that?

Last updated 3 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

anakadote anakadote Joined 10 Jul 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.