runjobs.php

来自「php 开发的内容管理系统」· PHP 代码 · 共 21 行

PHP
21
字号
<?phprequire_once( 'commandLine.inc' );require_once( "$IP/includes/JobQueue.php" );require_once( "$IP/includes/FakeTitle.php" );// Trigger errors on inappropriate use of $wgTitle$wgTitle = new FakeTitle;$dbw =& wfGetDB( DB_MASTER );while ( $dbw->selectField( 'job', 'count(*)', '', 'runJobs.php' ) ) {	while ( false != ($job = Job::pop()) ) {		wfWaitForSlaves( 5 );		print $job->id . "  " . $job->toString() . "\n";		if ( !$job->run() ) {			print "Error: {$job->error}\n";		}	}}?>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?