The RandomPagesPlugin (aka RandomPages) is a NeWikiPlugin that provides a randomly-updated, randomly-sized list of randomly-selected wiki pages. This notably does not update the list each time it is called but maintains a WikiEngine-specific Timer thread that manages the list. The idea being that for a random amount of time everyone on the wiki sees the same set of pages.
There's a certain perversity in the way this plugin works. Rather than provide a different set each time it is queried it updates itself randomly. If there are multiple instances of the plugin on the wiki, the single instance of the page generator (called the RandomPagesScheduler) takes the maximum values specified by all instances. The only way to reset the scheduler to a smaller value than the current maximum is to restart the wiki engine. Whether this is the best policy in the long run remains to be seen. Currently the maximum values (which over time the plugin may end up at) may need to be set a bit lower.
Since there's not much sense in permitting enormous values for this parameter its maximum is 168 (1 week, 24 times 7).
The basic idea for the RandomPagesPlugin comes from the RandomPages page on MeatballWiki:
Some things I've learnt about running a RandomPages script:
-- SunirShah
[30 October 2000] I've stopped the script. I have to fix it.
A query on an existing schedule:
[{RandomPages debug='true' refresh='-1'}]
(query)
pages: min=5; max=10; current=8
period: min=900s; max=86400s next=56129s
exclusions: SandBox, LeftMenu, RecentChanges, LeftMenuFooter, Welcome, Main
next refresh: 22 Nov, 03:53:52 UTC (remaining: 03:32:37)
A typical call for test schedule (30s - 1min), maxpages at minimum permitted:
[{RandomPages debug='true' refresh='0' maxpages='5' exclude='Main,Welcome,LeftMenu,RecentChanges,SandBox,LeftMenuFooter'}]
[{RandomPages maxpages='3' exclude='Main,Welcome,LeftMenu,RecentChanges,SandBox,LeftMenuFooter'}]