Closed hafung closed 4 years ago
log below:
[2020-06-21T14:24:03.777479+07:00] Cron.INFO: John Doe [] [] [2020-06-21T14:24:03.986969+07:00] Cron.INFO: John Doe [] [] [2020-06-21T14:24:04.575456+07:00] Cron.INFO: John Doe [] []
code:
$logger = $this->getLogger();
$this->schedule->call(
function ($firstName, $lastName) use ($logger) {
$logger->info(implode(' ', [$firstName, $lastName]));
},
[
'John',
'last_name' => 'Doe', // The keys are being ignored
],
'myCustomIdentifier1'
)->everyMinute(1)->onlyOne();
ooops, my fault, i started cron 3 times..
I do the cron in wsl 2(docker)
crontab l:
in function, it just the code copy from example, none special at all
anywork, it works, but
each execution call 3 times of my function
, it bothers meAnd the
onlyOne
does not affact