#########################
# MPI Testing Tool (MTT)
#  - Original plan
#
# Everyday
#  - 23:00 -  1:00  Update MTT Statistics [Database]
#  -  1:00 -  3:00  Update MTT Statistics [Contribution]
#  -  3:00 -  3:05  Update Contrib Graph
#  -  4:00 -  4:30  Maintain internal PostgreSQL stats (Day)
#  -  4:30 -  8:30  Update Static MTT Visualization Extension (Disabled due to heavy load)
#
# Saturday
#  -  1:00 - 12:00  Backup the MTT database
#  - 14:30 - 18:30  Update Static MTT Visualization Extension
#
# Sunday
#  -  4:00 -  4:30  Maintain internal PostgreSQL stats (Week)
#  -  4:00 -  4:30  Maintain internal PostgreSQL stats (Month) [1st sunday only]
#  -  5:00 -  5:30  Check for Integrity Violations (week)
#
#########################


#########################
# Update MTT Statistics [Database]
#  - everyday at 11:00
#  - runs in about 25 - 30  min
#########################
0 23 * * *  /l/osl/www/mtt.open-mpi.org/cron/mtt-update-stats-db-only.pl

#########################
# Update MTT Statistics [Contribution]
#  - everyday at 1 am
#  - runs in about 2 hours
#########################
0 1 * * *  /l/osl/www/mtt.open-mpi.org/cron/mtt-update-stats.pl

#########################
# Update Contrib Graphs
# - 3 am Everyday
# - Runs in < 1 min
# "-l" limits to just last year of data. (slightly faster to run)
#########################
0 3 * * * /l/osl/www/mtt.open-mpi.org/cron/create-contrib-graph.pl -l
30 3 * * * /l/osl/www/mtt.open-mpi.org/cron/create-contrib-graph.pl



#########################
# Maintain internal PostgreSQL stats (Week)
#  - Sunday at 4 am (except when Monthly is running)
#  - runs in about 30 min
# JJH: 11/7/2011 - Since Monthly disabled, run every week
#########################
##0 4 * * 0  if [ `date +\%d` -ge 8 ]; then /l/osl/www/mtt.open-mpi.org/cron/periodic-maintenance.pl -week 1> /dev/null 2> /dev/null; fi
0 4 * * 0  /l/osl/www/mtt.open-mpi.org/cron/periodic-maintenance.pl -week 1> /dev/null 2> /dev/null

#########################
# Maintain internal PostgreSQL stats (Year)
#  - Dec. 1 at 4 am
#  - runs in about 6 hours (?? Verify)
#########################
0 4 1 12 *  /l/osl/www/mtt.open-mpi.org/cron/periodic-maintenance.pl -year 1> /dev/null 2> /dev/null


#########################
# Email Reports
#  - Tues - Thursday at 9 am (Past 12 hours)
#  - Tues - Thursday at 9 pm (Past 24 hours)
#  - Monday at 9 am (Past 60 hours)
#########################
0 9 * * 2-4  /l/osl/www/mtt.open-mpi.org/cron/alerts.php -f /l/osl/www/mtt.open-mpi.org/cron/morning.ini 1> /dev/null 2> /dev/null
0 21 * * 2-4 /l/osl/www/mtt.open-mpi.org/cron/alerts.php -f /l/osl/www/mtt.open-mpi.org/cron/evening.ini 1> /dev/null 2> /dev/null
0 9 * * 1    /l/osl/www/mtt.open-mpi.org/cron/alerts.php -f /l/osl/www/mtt.open-mpi.org/cron/monday.ini  1> /dev/null 2> /dev/null



#######################################################################
# Build nightly tarballs
#######################################################################
0 21 * * * $HOME/scripts/netloc-nightly-tarball.sh </dev/null >/dev/null 2>&1
1 21 * * * $HOME/scripts/hwloc-nightly-tarball.sh </dev/null >/dev/null 2>&1
5 21 * * * $HOME/scripts/openmpi-nightly-tarball.sh </dev/null >/dev/null 2>&1


#######################################################################
# Update web sites
#######################################################################
*/15 * * * * $HOME/scripts/openmpi-update-www.open-mpi.org.sh < /dev/null > $HOME/tmp/git-www-ompi.log 2>&1
*/10 * * * * $HOME/scripts/forum-update-meetings.mpi-forum.org.sh  < /dev/null > $HOME/tmp/svn-up-forum.log 2>&1


#=====================================================================
#=====================================================================
# Outdated / unused scripts
#=====================================================================
#=====================================================================

#########################
# Maintain internal PostgreSQL stats (Day)
#  - every weekday at 4 am
#  - runs in about 10 - 20 min
#
# JJH: 12/20/2011 Disable this to try to help with memory issues in the db
#########################
#0 4 * * 1-5  /l/osl/www/mtt.open-mpi.org/cron/periodic-maintenance.pl -day 1> /dev/null 2> /dev/null

#########################
# Maintain internal PostgreSQL stats (Month)
#  - 1st Sunday of the Month at 4 am
#  - runs in about 21 hours (not 20 min)
# JJH: 11/7/2011 - Disabled due to long runtime causing submission errors
#########################
#0 4 * * 0  if [ `date +\%d` -lt 8 ]; then /l/osl/www/mtt.open-mpi.org/cron/periodic-maintenance.pl -month 1> /dev/null 2> /dev/null; fi

#30 20 * * * $HOME/scripts/openmpi-nightly-tmpbranch-tarball.sh </dev/null >/dev/null 2>&1
#0 0 * * * $HOME/scripts/openmpi-ft-cr-tarball.sh </dev/null >/dev/null 2>&1

# Don't build any more LAM/MPI tarballs!
#0 4 * * * $HOME/scripts/lammpi-nightly-tarball.sh </dev/null >/dev/null 2>&1

# As of 15 Sep 2014, we're 100% Gitdub.  Leaving this (commented out) entry for
# the time being, just in case gitdub implodes, and we need a hint on how to go
# back to the old way.
#*/5 * * * * /u/mpiteam/scripts/github-send-commit-mails.pl /u/mpiteam/git/hwloc-debian /u/mpiteam/git/docs /u/mpiteam/git/ompi-www /u/mpiteam/git/orcm /u/mpiteam/git/mtt
# Removed: /u/mpiteam/git/scon (defunct)
# Removed: /u/mpiteam/git/netloc (now using gitdub)

# Keep OMPI svn:ignore properties in sync with .gitignore_global and
# .hgignore_global
# Oct 2014: once we switched to GitHub, this was no longer necessary.
#0 1 * * * $HOME/scripts/openmpi-nightly-githgignore.sh
