Guest User

Untitled

a guest
Jun 19th, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.95 KB | None | 0 0
  1. <?php /**
  2. * Copyright © 2016 Magento. All rights reserved. * See COPYING.txt for license details.
  3. */
  4. MagentoFrameworkComponentComponentRegistrar::register( MagentoFrameworkComponentComponentRegistrar::MODULE, 'Autosynch_synchProduct',
  5. __DIR__
  6. );
  7.  
  8. <?xml version="1.0"?>
  9. <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Cron:etc/crontab.xsd">
  10. <group id="default">
  11. <job name="custom_cronjob" instance="AutosynchsynchProductCronTests" method="execute">
  12. <schedule>* * * * *</schedule>
  13. </job>
  14. </group>
  15. </config>
  16.  
  17. <?php
  18. namespace AutosynchsynchProductCron;
  19. use PsrLogLoggerInterface;
  20.  
  21. class Tests {
  22. protected $logger;
  23.  
  24. public function __construct(LoggerInterface $logger) {
  25. $this->logger = $logger;
  26. }
  27.  
  28. /**
  29. * Write to system.log
  30. *
  31. * @return void
  32. */
  33.  
  34. public function execute() {
  35. $this->logger->info('Cron Works');
  36. }
  37.  
  38. }
Add Comment
Please, Sign In to add comment