1<?php
2
3use WHMCS\Cron;
4use WHMCS\Exception\Fatal;
5use WHMCS\Terminus;
6
7/**
8 * admin/cron.php
9 *
10 * This file is deprecated and here for backwards compatibility.
11 *
12 * The distributed version of WHMCS provides the main application cron in
13 * crons/cron.php
14 *
15 * The crons folder may be moved to any place above or below the docroot.
16 *
17 * For more information please see https://docs.whmcs.com/Custom_Crons_Directory
18 */
19/** @var WHMCS\Application $whmcs */
20
21require dirname(__DIR__) . DIRECTORY_SEPARATOR . 'init.php';
22
23define('PROXY_FILE', true);
24
25try {
26 $path = Cron::getCronsPath(basename(__FILE__));
27 require_once $path;
28} catch (Fatal $e) {
29 echo Cron::formatOutput(Cron::getCronRootDirErrorMessage());
30 Terminus::getInstance()->doExit(1);
31} catch (\Exception $e) {
32 echo Cron::formatOutput(Cron::getCronPathErrorMessage());
33 Terminus::getInstance()->doExit(1);
34}
35