Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php /**
- * Copyright © 2016 Magento. All rights reserved. * See COPYING.txt for license details.
- */
- MagentoFrameworkComponentComponentRegistrar::register( MagentoFrameworkComponentComponentRegistrar::MODULE, 'Autosynch_synchProduct',
- __DIR__
- );
- <?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="custom_cronjob" instance="AutosynchsynchProductCronTests" method="execute">
- <schedule>* * * * *</schedule>
- </job>
- </group>
- </config>
- <?php
- namespace AutosynchsynchProductCron;
- use PsrLogLoggerInterface;
- class Tests {
- protected $logger;
- public function __construct(LoggerInterface $logger) {
- $this->logger = $logger;
- }
- /**
- * Write to system.log
- *
- * @return void
- */
- public function execute() {
- $this->logger->info('Cron Works');
- }
- }
Add Comment
Please, Sign In to add comment