So when I run the php bin/magento cron:run
I get error as PHP Fatal error: Uncaught Error: Cannot instantiate interface Magento\Framework\Filesystem\DriverInterface
This error gets disappear after two times I run the cron:run
In my local Magento 2.3.4 setup. But unfortunately in Cloud Instance this error persist forever. So looking for the solution.
The below code in my custom module cron.php file which is scheduled as * * * * *
public function __construct(
\Magento\Framework\Filesystem\DriverInterface $driverInterface,
...
) {
$this->_fileDriverInterface = $fileDriverInterface;
...
}
I have found in local If I run php bin/magent setup:upgrade
I get this error for two time while running cron:run as mentioned above. After that it works.
Anyone has idea about this error?