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

ene's avatar
Level 2

Laravel Cron job not working as expected

I am trying to run a command use Cron job in shared hosting /sure/bin/php /home/naijc**/rem***/artisan schedule:run

Instead of getting a success message I am receiving command list


Laravel Framework 9.44.0

Usage:
  command [options] [arguments]

Options:
  -h, --help            Display help for the given command. When no command is given display help for the list command
  -q, --quiet           Do not output any message
  -V, --version         Display this application version
      --ansi|--no-ansi  Force (or disable --no-ansi) ANSI output
  -n, --no-interaction  Do not ask any interactive question
      --env[=ENV]       The environment the command should run under
  -v|vv|vvv, --verbose  Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

Available commands:
  about                           Display basic information about your application
  clear-compiled                  Remove the compiled class file
  completion                      Dump the shell completion script
  daily                           Command description
  db                              Start a new database CLI session
  docs                            Access the Laravel documentation
  down                            Put the application into maintenance / demo mode
  env                             Display the current framework environment
  help                            Display help for a command
  inspire                         Display an inspiring quote
  list                            List commands
  migrate                         Run the database migrations
  optimize                        Cache the framework bootstrap files
  serve                           Serve the application on the PHP development server
  test                            Run the application tests
  tinker                          Interact with your application
  up                              Bring the application out of maintenance mode
 auth
  auth:clear-resets               Flush expired password reset tokens
 bx
  bx:transfer:fix                 Brings transfers to the correct form/to.
 cache
  cache:clear                     Flush the application cache
  cache:forget                    Remove an item from the cache
  cache:table                     Create a migration for the cache database table
 config
  config:cache                    Create a cache file for faster configuration loading
  config:clear                    Remove the configuration cache file
 db
  db:monitor                      Monitor the number of connections on the specified database
  db:seed                         Seed the database with records
  db:show                         Display information about the given database
  db:table                        Display information about the given database table
  db:wipe                         Drop all tables, views, and types
 env
  env:decrypt                     Decrypt an environment file
  env:encrypt                     Encrypt an environment file
 event
  event:cache                     Discover and cache the application's events and listeners
  event:clear                     Clear all cached events and listeners
  event:generate                  Generate the missing events and listeners based on registration
  event:list                      List the application's events and listeners
 filament
  filament:check-translations     Checks for missing and removed translations.
  filament:upgrade                Upgrade Filament to the latest version.
 forms
  forms:install                   Set up form builder CSS and JS in a fresh Laravel installation.
 key
  key:generate                    Set the application key
 make
  make:cast                       Create a new custom Eloquent cast class
  make:channel                    Create a new channel class
  make:command                    Create a new Artisan command
  make:component                  Create a new view component class
  make:controller                 Create a new controller class
  make:coupon                     Add the coupon to database
  make:event                      Create a new event class
  make:exception                  Create a new custom exception class
  make:factory                    Create a new model factory
  make:filament-belongs-to-many   Creates a Filament relation manager class for a resource.
  make:filament-has-many          Creates a Filament relation manager class for a resource.
  make:filament-has-many-through  Creates a Filament relation manager class for a resource.
  make:filament-morph-many        Creates a Filament relation manager class for a resource.
  make:filament-morph-to-many     Creates a Filament relation manager class for a resource.
  make:filament-page              Creates a Filament page class and view.
  make:filament-relation-manager  Creates a Filament relation manager class for a resource.
  make:filament-resource          Creates a Filament resource class and default page classes.
  make:filament-user              Creates a Filament user.
  make:filament-widget            Creates a Filament widget class.
  make:form-field                 Creates a form field class and view.
  make:form-layout                Creates a form layout component class and view.
  make:job                        Create a new job class
  make:listener                   Create a new event listener class
  make:livewire-form              Creates a Livewire component containing a Filament form.
  make:livewire-table             Creates a Livewire component containing a Filament table.
  make:mail                       Create a new email class
  make:middleware                 Create a new middleware class
  make:migration                  Create a new migration file
  make:model                      Create a new Eloquent model class
  make:notification               Create a new notification class
  make:observer                   Create a new observer class
  make:policy                     Create a new policy class
  make:provider                   Create a new service provider class
  make:request                    Create a new form request class
  make:resource                   Create a new resource
  make:rule                       Create a new validation rule
  make:scope                      Create a new scope class
  make:seeder                     Create a new seeder class
  make:table-column               Creates a table column class and cell view.
0 likes
14 replies
Sinnbeck's avatar

@ene And if you cd /path/to/project and then php artisan schedule:run

ene's avatar
Level 2

@Sinnbeck Cron I did this cd remian && php artisan schedule:run

I am still getting the command list

Sinnbeck's avatar

@ene is cd remian the complete path from the root of the server, to your project? Normally it is something like /some/path/remian. Type pwd to see the full path

ene's avatar
Level 2

@sinnbeck am still getting the command list and don't know why that is happening

Sinnbeck's avatar

@ene sadly I have no idea then. How do you know the output? It had a log?

ene's avatar
Level 2

@Sinnbeck in Cron tab I added my email, so it sent email any time the Cron runs

Sinnbeck's avatar

@ene maybe ask the provider. Show that the exact command works in ssh, but fails in cron. My guess is that it ignores the last part of the command for some reason (schedule:run)

Please or to participate in this conversation.