Cron jobs

From Wikitech
(Difference between revisions)
Jump to: navigation, search
(/usr/bin)
(updates)
Line 3: Line 3:
 
== QueryPage update ==
 
== QueryPage update ==
  
'''srv31:/var/spool/cron/tstarling''': updates the special pages derived from QueryPage
+
'''hume:/etc/cron.d/mw-update-special-pages''': updates the special pages derived from QueryPage
  
 
<pre>
 
<pre>
 
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
 
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/updateSpecialPages-small.log 2>&1
+
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/updateSpecialPages.log 2>&1
+
00 5 */3 * * /home/wikipedia/bin/update-special-pages > /home/wikipedia/logs/norotate/updateSpecialPages.log 2>&1
 
</pre>
 
</pre>
  
Line 40: Line 40:
 
== Tor exit list update ==
 
== Tor exit list update ==
  
'''hume:/var/spool/cron/crontabs/tstarling''': Loads the tor exit list from check.torproject.org and saves it into memcached for later use by the TorBlock extension.
+
'''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.
  
 
<pre>
 
<pre>
Line 49: Line 49:
 
== FlaggedRevs stats update ==
 
== FlaggedRevs stats update ==
  
'''hume:/var/spool/cron/crontabs/tstarling''': Updates the flaggedrevs_stats table
+
'''hume:/etc/cron.d/mw-flagged-revs''': Updates the flaggedrevs_stats table
  
 
<pre>
 
<pre>
Line 85: Line 85:
 
== CentralNotice (donation banner) template update ==
 
== CentralNotice (donation banner) template update ==
  
'''hume:/var/spool/cron/crontabs/tstarling''': Updates the donation banner JavaScript files in /mnt/upload3/centralnotice/test
+
'''hume:/etc/cron.d/mw-central-notice''': Updates the donation banner JavaScript files in /mnt/upload3/centralnotice/test
  
 
<pre>
 
<pre>

Revision as of 01:32, 5 February 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/centralnotice.log
Personal tools
Namespaces

Variants
Actions
Navigation
Ops documentation
Wiki
Toolbox