2011-12-27 20:51:56 +01:00
|
|
|
#########################################################
|
|
|
|
### all the cron jobs you may need for piler ###
|
|
|
|
### be sure to review it and adjust it for your needs ###
|
|
|
|
#########################################################
|
2011-12-07 15:24:52 +01:00
|
|
|
|
2011-12-27 20:51:56 +01:00
|
|
|
root's crontab:
|
2011-12-07 15:24:52 +01:00
|
|
|
|
2011-12-27 20:51:56 +01:00
|
|
|
### optional: query postfix queue statistics
|
|
|
|
*/5 * * * * PATH=$PATH:/usr/sbin:/usr/local/sbin /usr/sbin/qshape > LOCALSTATEDIR/piler/stat/active+incoming
|
|
|
|
*/5 * * * * PATH=$PATH:/usr/sbin:/usr/local/sbin /usr/sbin/qshape -s > LOCALSTATEDIR/piler/stat/active+incoming-sender
|
|
|
|
*/5 * * * * PATH=$PATH:/usr/sbin:/usr/local/sbin /usr/sbin/qshape deferred > LOCALSTATEDIR/piler/stat/deferred
|
|
|
|
*/5 * * * * PATH=$PATH:/usr/sbin:/usr/local/sbin /usr/sbin/qshape -s deferred > LOCALSTATEDIR/piler/stat/deferred-sender
|
2011-12-07 15:24:52 +01:00
|
|
|
|
|
|
|
|
2011-12-27 20:51:56 +01:00
|
|
|
piler's crontab:
|
|
|
|
|
2012-10-23 18:55:16 +02:00
|
|
|
### mandatory
|
|
|
|
|
2013-07-08 11:31:17 +02:00
|
|
|
*/5 * * * * LC_ALL=C mpstat | tail -1 | awk '{print $11}' > /var/piler/stat/cpu.stat
|
|
|
|
5,35 2-23 * * * /usr/local/bin/indexer --quiet delta1 --rotate && sleep 2 && /usr/local/bin/indexer --quiet --merge dailydelta1 delta1 --merge-dst-range deleted 0 0 --rotate
|
|
|
|
15 0 * * * /usr/local/bin/indexer --quiet --merge main1 dailydelta1 --merge-dst-range deleted 0 0 --rotate && sleep 2 && /usr/local/bin/indexer --quiet dailydelta1 --rotate
|
2012-08-25 21:13:43 +02:00
|
|
|
*/15 * * * * /usr/local/bin/indexer --quiet tag1 --rotate
|
2012-10-23 18:55:16 +02:00
|
|
|
*/15 * * * * /usr/local/bin/indexer --quiet note1 --rotate
|
|
|
|
|
|
|
|
### optional: the same report you can see on the health page
|
|
|
|
30 7 * * * /usr/local/libexec/piler/daily-report.php /srv/www/webui.yourdomain.com
|
2011-12-27 20:51:56 +01:00
|
|
|
|
2013-03-21 19:01:06 +01:00
|
|
|
### optional: populate accouting data
|
|
|
|
30 6 * * * /usr/local/libexec/piler/generate_stats.php /srv/www/webui.yourdomain.com
|
|
|
|
|
2011-12-27 20:51:56 +01:00
|
|
|
### optional: regular AD sync
|
|
|
|
0 8 * * * /usr/bin/php LIBEXECDIR/piler/ldap_sync.php /srv/www/webui.yourdomain.com > LOCALSTATEDIR/piler/stat/adsync.stat
|
|
|
|
|
2012-10-23 22:11:15 +02:00
|
|
|
### optional: purge aged emails
|
|
|
|
2 0 * * * /usr/local/bin/pilerpurge
|
|
|
|
|
2011-12-27 20:51:56 +01:00
|
|
|
|