When I try to run the command php spark cronjob:enable, I get the following error:
[ErrorException]
mkdir(): No such file or directory
at VENDORPATH/daycry/cronjob/src/Commands/CronJobCommand.php:39
The block of code it's failing on is:
// dir doesn't exist, make it
if (!is_dir($this->configfilePath)) {
mkdir($this->configfilePath);
}
Doing some basic debugging shows that $this->configfilePath is NULL. Earlier, in this file, I see $this->config = config('CronJob');, so shouldn't it be $this->config->filePath?
My app/Config/CronJob.php has the following:
/**
* Directory
*/
public string $filePath = WRITEPATH . 'cronJob/';
/**
* File Name in folder jobs structure
*/
public string $fileName = 'jobs';
Where does $this->configfilePath get set and should it actually be $this->config->filePath?
When I try to run the command
php spark cronjob:enable
, I get the following error:The block of code it's failing on is:
Doing some basic debugging shows that
$this->configfilePath
isNULL
. Earlier, in this file, I see$this->config = config('CronJob');
, so shouldn't it be$this->config->filePath
?My
app/Config/CronJob.php
has the following:Where does
$this->configfilePath
get set and should it actually be$this->config->filePath
?