I have followed the tutorial on Magento dev docs to create a custom crontab. Checking the cron_schedule table and various logs, I can see that cron is successfully running M2 jobs (e.g. indexer, mailers), but not the custom crontab. There is no mention of it at all - no errors in the Magento or server logs; no entry in cron_schedule.
I have manually run cron serveral times, seeing the message "Ran jobs by schedule" each time. I have set cron to log to var/log/magento.cron.log, and there I see only the same "Ran jobs by schedule" message - no other output from the other M2 cron jobs which I know are running (because they show status "success" in cron_schedule).
The custom module crontab (etc/crontab.xml):
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Cron:etc/crontab.xsd">
<group id="default">
<job name="cronjob_default" instance="Vex\SportIntBase\import\StoredProcCronDefault" method="execute">
<schedule>* * * * *</schedule>
</job>
</group>
</config>
The class:
namespace Vex\SportIntBase\import;
use \Psr\Log\LoggerInterface;
class StoredProcCronDefault
{
protected $_logger;
private $_fetchers;
const PATH = __DIR__ . 'vendor/vex/module-sport-int-base/import';
public function __construct(LoggerInterface $logger) {
$this->_logger = $logger;
$this->_fetchers = array(
'price_fetch.php',
'products_fetch.php',
'stock_fetch.php'
);
}
public function execute() {
$this->_logger->info('Beginning VexSport Stored Procedure Run (default)');
foreach($this->_fetchers as $runSP) {
include(SELF::$PATH) . $runSP;
}
}
}
Version info: M2 2.1.2, PHP 7.0.13, Debian 8.6.
Thanks for any ideas or suggestions. I'm stumped.