1: | <?php
2: | namespace Opencart\Catalog\Controller\Cron;
3: | /**
4: | * Class Cron
5: | *
6: | * @package Opencart\Catalog\Controller\Cron
7: | */
8: | class Cron extends \Opencart\System\Engine\Controller {
9: | /**
10: | * @return void
11: | */
12: | public function index(): void {
13: | $time = time();
14: |
15: | $this->load->model('setting/cron');
16: |
17: | $results = $this->model_setting_cron->getCrons();
18: |
19: | foreach ($results as $result) {
20: | if ($result['status'] && (strtotime('+1 ' . $result['cycle'], strtotime($result['date_modified'])) < ($time + 10))) {
21: | $this->load->controller($result['action'], $result['cron_id'], $result['code'], $result['cycle'], $result['date_added'], $result['date_modified']);
22: |
23: | $this->model_setting_cron->editCron($result['cron_id']);
24: | }
25: | }
26: | }
27: | }
28: |

OpenCart API API documentation generated by ApiGen dev-master