Help:Cron jobs

From semantic-mediawiki.org
(Redirected from Help:Cron jobs)
Maintenance tasksHelp:Cron jobs

Cron is used to schedule jobs (commands or shell scripts) to run periodically at fixed times, dates, or intervals. It typically automates system maintenance or administration, also when using MediaWiki and Semantic MediaWiki.

Depending on the size (user base, articles count, annotation amount) script schedules need to be adapted according to the local needs of a wiki instance but some tasks should be run more frequent than others.

@hourly .23 php /path/to/maintenance/runJobs.php --quiet --maxjobs=200 --maxtime=300 --memory-limit=128M
If you are using MediaWiki 1.27 and later as well as Semantic MediaWiki 2.4.0Released on 9 July 2016 and compatible with MW 1.19.0 - 1.27.x. and later it is recommended to run MediaWiki's maintenance script "runJobs.php" (MediaWiki.org) at least every ten minutes.
@daily 7.45 php /path/to/maintenance/updateSpecialPages.php --quiet
The cron job directly above is is only required if you set MediaWiki's configuration parameter $wgMiserMode (MediaWiki.org) to "true".
@daily 5.15 php /path/to/extensions/SemanticMediaWiki/maintenance/rebuildData.php --quiet --shallow-update
@daily 6.15 php /path/to/extensions/SemanticMediaWiki/maintenance/disposeOutdatedEntities.php --quiet
@daily 7.15 php /path/to/extensions/SemanticMediaWiki/maintenance/rebuildPropertyStatistics.php --quiet
@daily 8.15 php /path/to/extensions/SemanticMediaWiki/maintenance/rebuildConceptCache.php --quiet --update --create
@weekly 9.15 php /path/to/extensions/SemanticMediaWiki/maintenance/rebuildData.php --quiet -d 100
@weekly 5.30 php /path/to/extensions/SemanticMediaWiki/maintenance/setupStore.php --quiet --skip-import
@monthly 3.15 php /path/to/extensions/SemanticMediaWiki/maintenance/removeDuplicateEntities.php --quiet 

Explanations about options selected can be found on the individual script help page.

For example, to execute a script every ten minutes add the following to your crontab (or the Windows TaskScheduler)

*/10 * * * * php /path/to/maintenance/runJobs.php --quiet --maxjobs=200 --maxtime=300 --memory-limit=128M