Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Numinix MediaWiki Demo
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Manual/Job queue
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Special pages
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==== Create script ==== <!--T:133--> </translate> <syntaxhighlight lang="bash"> #!/bin/bash # <translate nowrap><!--T:103--> Put the MediaWiki installation path on the line below</translate> MW_INSTALL_PATH="/home/www/www.mywikisite.example/mediawiki" RUN_JOBS="$MW_INSTALL_PATH/maintenance/runJobs.php --maxtime=3600" echo <translate nowrap><!--T:104--> Starting job service...</translate> # <translate nowrap><!--T:105--> Wait a minute after the server starts up to give other processes time to get started</translate> sleep 60 echo <translate nowrap><!--T:106--> Started.</translate> while true; do # <translate nowrap><!--T:107--> Job types that need to be run ASAP no matter how many of them are in the queue</translate> # <translate nowrap><!--T:108--> Those jobs should be very "cheap" to run</translate> php $RUN_JOBS --type="enotifNotify" # <translate nowrap><!--T:109--> Everything else, limit the number of jobs on each batch</translate> # <translate nowrap><!--T:110--> The <tvar name=1>--wait</tvar> parameter will pause the execution here until new jobs are added, to avoid running the loop without anything to do</translate> php $RUN_JOBS --wait --maxjobs=20 # <translate nowrap><!--T:112--> Wait some seconds to let the CPU do other things, like handling web requests, etc</translate> echo <translate nowrap><!--T:113--> Waiting for 10 seconds...</translate> sleep 10 done </syntaxhighlight> <translate> <!--T:114--> Depending on how fast the server is and the load it handles, you can adapt the number of jobs to run on each cycle and the number of seconds to wait on each cycle. <!--T:115--> Make the script executable (<tvar name=1><code>chmod 755</code></tvar>).
Summary:
Please note that all contributions to Numinix MediaWiki Demo may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Project:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)