# need to have /sbin and /usr/sbin so that commands used in report_stats.sh work
PATH=/sbin:/bin:/usr/sbin:/usr/bin

# Starfish cron jobs

# Send Starfish diagnostic report to Starfish Corporation.
# The reports are sent only if SENDING_DIAGNOSTIC_REPORTS_ENABLED=true
# in /etc/sysconfig/starfish on RedHat/CentOS or /etc/default/starfish on Ubuntu.
# Regardless of the option above, the files containing the json
# representation of the reports are also stored in log directory.
# Emails provided here will receive warnings and errors.
55 3 * * *       root          /opt/starfish/bin/tools/report_stats.sh

# reset stats to have e.g. WAL / bg_writer stats up to date.
# The script should be executed after report_stats.sh. When updating one the other should be updated also.
55 4 * * SUN  postgres     /opt/starfish/bin/tools/reset_pg_stats.sh


# Backup schedule for Starfish database.
# The backup is performed only if backup has been configured during installation,
# and PG_BACKUP_CONFIGURED=true in /etc/sysconfig/starfish on RedHat/CentOS
# or /etc/default/starfish on Ubuntu.
# Otherwise the commands do nothing.
30 0 * * SAT      postgres     /opt/starfish/bin/tools/pg_backup.sh --type=full
30 0 * * MON-FRI  postgres     /opt/starfish/bin/tools/pg_backup.sh --type=incr
