Manual:ResetPageRandom.php

Category:MediaWiki code#ResetPageRandom.php

Details

resetPageRandom.php maintenance script resets the page_random field for articles in the provided time range. The page_random field in the page table is responsible for returning random pages. This is useful when you want to refresh your random article sequence.

Options

Option Required Default value
--fromFrom date range selector to select articles to update, ex: 20041011000000Required
--toTo date range selector to select articles to update, ex: 20050708000000Required
--dryDo not update column. Just do dry run.Optional
--batch-startUse when you need to restart the reset process from a given page ID offset in case a previous reset failed or was stoppedOptional

Usage

php maintenance/run.php resetPageRandom --from fromDate --to toDate [ --dry | --batch-start ]
In MediaWiki version 1.39.12 and earlier, you must invoke maintenance scripts using php maintenance/scriptName.php instead of php maintenance/run.php scriptName.

Dry run to test

Terminal

Actual run to update the column

Terminal

See also

Category:Maintenance scripts Category:Content maintenance scripts
Category:Content maintenance scripts Category:Maintenance scripts Category:MediaWiki code