Files
Pichome/cron.php
2024-02-06 00:03:33 +08:00

24 lines
787 B
PHP
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
/*
* @copyright Leyun internet Technology(Shanghai)Co.,Ltd
* @license http://www.dzzoffice.com/licenses/license.txt
* @package DzzOffice
* @link http://www.dzzoffice.com
* @author zyx(zyx@dzz.cc)
*/
//计划任务触发程序
//如果这个程序运行可以修改config文件($_config['remote']['cron'] = 1),正常的访问不运行计划任务;
// echo '* * * * php cron.php >>/dev/null 2>$1' > /etc/crontab
// crontab cron.txt
define('APPTYPEID', 200);
define('CURSCRIPT', 'cron');
define('DZZSCRIPT', 'index.php');
require __DIR__.'/core/coreBase.php';
$dzz = C::app();
$dzz->init_user=false;
$dzz->init_session=false;
$dzz->init_cron=false;
$dzz->init_misc=false;
$dzz->init();
dzz_cron::runcron();
exit('success');