Cron jobs

From Wikitech
(Difference between revisions)
Jump to: navigation, search
(CentralNotice (donation banner) template update: update)
m (Batch jobs moved to Cron jobs)

Revision as of 07:30, 19 May 2009

Note: the job queue runs continuously on many servers and is not a cron job.

Contents

QueryPage update

hume:/etc/cron.d/mw-update-special-pages: updates the special pages derived from QueryPage

PATH=/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/home/wikipedia/bin:/home/tstarling/bin:/usr/local/bin:/usr/local/mysql/bin:/home/tstarling/bin
00 4 * * * /home/wikipedia/bin/update-special-pages-small > /home/wikipedia/logs/norotate/updateSpecialPages-small.log 2>&1
00 5 */3 * * /home/wikipedia/bin/update-special-pages > /home/wikipedia/logs/norotate/updateSpecialPages.log 2>&1

update-special-pages-small

#!/bin/bash

cd /home/wikipedia/common/php-1.5/maintenance
for db in `</home/wikipedia/common/small.dblist`; do
	echo $db
	/usr/local/bin/php updateSpecialPages.php $db
	echo
	echo
done

update-special-pages

#!/bin/bash

cluster=`</etc/cluster`
cd /home/wikipedia/common/php-1.5/maintenance
for db in `</home/wikipedia/common/$cluster.dblist`; do
	echo $db
	/usr/local/bin/php updateSpecialPages.php $db
	echo
	echo
done

Tor exit list update

hume:/etc/cron.d/mw-tor-list: Loads the tor exit list from check.torproject.org and saves it into memcached for later use by the TorBlock extension.

PATH=/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/home/wikipedia/bin:/home/tstarling/bin:/usr/local/bin:/usr/local/mysql/bin:/home/tstarling/bin
*/20 * * * * php -n /home/wikipedia/common/php/extensions/TorBlock/loadExitNodes.php 2>&1

FlaggedRevs stats update

hume:/etc/cron.d/mw-flagged-revs: Updates the flaggedrevs_stats table

0 */2 * * * /home/wikipedia/common/php/extensions/FlaggedRevs/maintenance/wikimedia-periodic-update.sh 2>&1

wikimedia-periodic-update.sh

#!/bin/bash
for db in `</home/wikipedia/common/flaggedrevs.dblist`;do
	echo $db
	php -n /home/wikipedia/common/php/extensions/FlaggedRevs/maintenance/updateStats.php $db
done

Ganglia RRD commit

zwinger:/etc/cron.hourly/save-gmetad-rrds: The live RRD files for ganglia are kept in a tmpfs, for performance reasons. This script copies them back to disk in case of server restart

#!/bin/sh
/usr/local/bin/save-gmetad-rrds >> /var/log/save-gmetad-rrds.log 2>&1

save-gmetad-rrds

#!/bin/bash
service gmetad_pmtpa stop
echo "Saving RRDs..."
time rsync -a /mnt/ganglia_tmp/rrds.pmtpa/ /var/lib/ganglia/rrds.pmtpa
echo "Done"
service gmetad_pmtpa start

CentralNotice (donation banner) template update

hume:/etc/cron.d/mw-central-notice: Updates the donation banner JavaScript files in /mnt/upload3/centralnotice/test

*/10 * * * * /usr/bin/php /home/wikipedia/common/php-1.5/extensions/CentralNotice/rebuildTemplates.php metawiki 2>&1 > /home/wikipedia/logs/norotate/centralnotice.log
Personal tools
Namespaces

Variants
Actions
Navigation
Ops documentation
Wiki
Toolbox