php - Task schedular of laravel not working properly on server -
i able execute individual artisan commands on server using putty cli. eg.
php artisan inspire
and other custom commands related database, work fine while using putty. put them in kernel.php 's schedule funtion this
protected function schedule(schedule $schedule){ $schedule->command('customcommand:execute')->everyminute(); }
when run command using putty
php artisan schedule:run
it works fine. problem not able execute schedule:run command via servers cron job.. command looks on server
php -d register_argc_argv=on /path/to/artisan schedule:run >> /dev/null 2>&1
funny thing able execute individual commands via servers cron job i.e.
php -d register_argc_argv=on /path/to/artisan customcommand:execute >> /dev/null 2>&1
works well...
only schedule command not working.
also not show errors..
also if dont add '-d register_argc_argv=on', exception 'errorexception' message 'invalid argument supplied foreach()
again here server mean cpanal, have added command under 'cron jobs'
i think forgot add task crontab. tutorial great , think answer question. https://laracasts.com/lessons/recurring-tasks-the-laravel-way
Comments
Post a Comment