示例#1
0
<?php

/**
 *
 * @copyright  2014 izend.org
 * @version    1
 * @link       http://www.izend.org
 */
require_once 'pdo.php';
$db_url = $scheme . '://test:test@localhost/test';
$db_prefix = 'test_';
$db_debug = true;
db_connect($db_url);
require_once 'registry.php';
$msecs = microtime(true);
$now = time();
$semaphore = registry_get('cron_lock', false);
if ($semaphore) {
    dump($now - $semaphore);
}
registry_set('cron_last', $now);
registry_set('cron_lock', $now);
registry_delete('cron_lock');
echo sprintf('%.4f', microtime(true) - $msecs), PHP_EOL;
示例#2
0
文件: cron.php 项目: RazorMarx/izend
function cron_cleanup()
{
    registry_delete('cron_lock');
}