
# Copyright 2008-2014 Cumulus Systems Incorporated.
# All Rights Reserved.
#
# MARS crontab entries for Linux data collection.
# This file is installed into user's crontab.
# Copying from %INSTALLDIR%/cronJobs.

SHELL=/bin/sh

# Supply this PATH to our jobs.
PATH=.:%SCRIPTDIR%:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin

# Don't send mail on failures.
MAILTO=""

# If we can't cd into the directory, maybe the user uninstalled it; exit quietly with no error message.

# Main data collection. The number after "*/" is N.  See conf/runtime.properties file.
*/%FREQ% * * * *   D=%SCRIPTDIR%; test -d $D || exit 0; mkdir -p %LOGDIR%/tmp; cd $D && ./triggerDataCollection.pl -d %INSTALLDIR% -s %SIZE_LIMIT_OF_BACKLOG_FILES% > %LOGDIR%/tmp/linuxProbe.dump || exit 0

# Real-time send files, starts once, restart if it dies.
*/6   * * * *  	D=%SCRIPTDIR%; test -d $D || exit 0;  mkdir -p %LOGDIR%; mkdir -p %LOGDIR%/tmp; cd $D && ./sendRawData.pl -d %INSTALLDIR% > %LOGDIR%/tmp/linuxProbe.dump || exit 0

# Expire old sent files, resent old pending files.
25   * * * *	D=%SCRIPTDIR%; test -d $D || exit 0; mkdir -p %LOGDIR%/tmp; cd $D && ./cleanupOldFiles.sh %INSTALLDIR% > %LOGDIR%/tmp/linuxProbe.dump || exit 0
