I am trying to run custom cron but,
I got below error in system.log
while execute cron:run
command.
main.WARNING: Could not acquire lock for cron group: default, skipping run [] []
crontab.xml file
<group id="default">
<job name="test_cron" instance="Vendor\Module\Cron\Test" method="execute">
<schedule>* * * * *</schedule>
</job>
</group>
Cron/Test.php
namespace Vendor\Module\Cron;
class Test {
public function execute() {
$writer = new \Zend\Log\Writer\Stream(BP . '/var/log/customcron.log');
$logger = new \Zend\Log\Logger();
$logger->addWriter($writer);
$logger->info("cron works");
}
}