我按照这个网站的说明:http://colorblindprogramming.com/cronjobs-in-cakephp-2-in-5-steps,但我的cronjob不起作用.
这是我的/app/cron_dispatcher.php:
<?php
if (!defined('DS')) {
define('DS', DIRECTORY_SEPARATOR);
}
if (!defined('ROOT')) {
define('ROOT', dirname(dirname(__FILE__)));
}
if (!defined('APP_DIR')) {
define('APP_DIR', basename(dirname(__FILE__)));
}
if (!defined('WEBROOT_DIR')) {
define('WEBROOT_DIR', basename(dirname(__FILE__)));
}
if (!defined('WWW_ROOT')) {
define('WWW_ROOT', dirname(__FILE__) . DS);
}
if (!defined('CAKE_CORE_INCLUDE_PATH')) {
if (function_exists('ini_set')) {
ini_set('include_path', ROOT . DS . 'lib' . PATH_SEPARATOR . ini_get('include_path'));
}
if (!include('Cake' . DS . 'bootstrap.php')) {
$failed = true;
}
} else {
if (!include(CAKE_CORE_INCLUDE_PATH . DS . 'Cake' . DS . 'bootstrap.php')) …Run Code Online (Sandbox Code Playgroud)