What happens if you just run the second method with the logging? Does it work?
Commands not firing inside the schedule method of laravel scheduler
I am trying to run artisan commands by laravel scheduler, i followed exactly the documentation of scheduling. here is the cron job set in my hostinger shared hosting control panel to start the laravel scheduler -
***** /usr/bin/php /home/u483465152/public_html/artisan schedule:run
in my app/console/kernel.php file, i put following two commands in schedule method -
$schedule->command('user_transaction:sync') ->everyMinute() ;
$schedule->call(function () { Log::info("call test done"); })->everyFiveMinutes();
For the first command above, following codes are in the User_Transaction.php command file located in app/console/commands folder -
class User_Transaction extends Command { protected $signature = 'user_transaction:sync';
protected $description = 'Command description';
public function __construct()
{
parent::__construct();
}
public function handle()
{
Log::info("cron job user transaction command handle ");
}
}
But i see that cron job works and it enters the schedule method (i tested by log) but the two commands in the schedule method is not firing !!, plz help, i have been struggling for more than 12 hours, i really tried many options all the ways, where is the leak?
Thanks in advance.
Please or to participate in this conversation.