MAILTO=REPL_MAILTO MAILFROM=REPL_MAILFROM PATH=/p4/common/bin:/p4/REPL_INSTANCE/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin: SHELL=/bin/bash # common tasks # Auto update the crontab */60 * * * * [ -e /p4/p4.crontab ] && crontab /p4/p4.crontab > /dev/null 2>&1 INSTANCE=REPL_INSTANCE # Master Verify - Uncomment this line if you do not have any replica servers. # 5 4 * * 6 [ -e /p4/common/bin ] && /p4/common/bin/run_if_master.sh ${INSTANCE} /p4/common/bin/p4verify.sh ${INSTANCE} # Run the wweekly maintenance script to clean up old users, labels, workspaces and changelists. Be sure to set up the maintenance.cfg file. 0 10 * * * /p4/common/bin/run_if_master.sh ${INSTANCE} /p4/sdp/Maintenance/maintenance ${INSTANCE} 0 9 * * * /p4/common/bin/run_if_edge.sh ${INSTANCE} /p4/sdp/Maintenance/edge_maintenance ${INSTANCE} # Run p4 unlock -x on edge servers each hour to remove exclusive locks that shouldn't be there. */60 * * * * [ -e /p4/common/bin ] && /p4/common/bin/run_if_master.sh ${INSTANCE} p4 unlock -x > /dev/null 2>&1 */60 * * * * [ -e /p4/common/bin ] && /p4/common/bin/run_if_edge.sh ${INSTANCE} p4 unlock -x > /dev/null 2>&1 # Update the limits group to make sure all users are listed in it. */60 * * * * [ -e /p4/common/bin ] && /p4/common/bin/run_if_master.sh ${INSTANCE} /p4/common/bin/update_limits.py ${INSTANCE} # Checkpoints # Run recreate_db_checkpoint.sh on the first Saturday afternoon in Jan. and July. 5 12 * 1,4,7,10 6 [ $(date +\%d) -le 07 ] && /p4/common/bin/run_if_master.sh ${INSTANCE} /p4/common/bin/rotate_journal.sh ${INSTANCE} 5 13 * 1,4,7,10 6 [ $(date +\%d) -le 07 ] && /p4/common/bin/run_if_master.sh ${INSTANCE} /p4/common/bin/recreate_db_checkpoint.sh ${INSTANCE} 5 2 * * * [ -e /p4/common/bin ] && /p4/common/bin/run_if_master.sh ${INSTANCE} /p4/common/bin/daily_checkpoint.sh ${INSTANCE} 35 13 * 1,4,7,10 6 [ $(date +\%d) -le 07 ] && /p4/common/bin/run_if_edge.sh ${INSTANCE} /p4/common/bin/recreate_db_checkpoint.sh ${INSTANCE} 35 2 * * * [ -e /p4/common/bin ] && /p4/common/bin/run_if_edge.sh ${INSTANCE} /p4/common/bin/daily_checkpoint.sh ${INSTANCE} # p4review daemon # */5 * * * * [ -e /p4/common/bin ] && /p4/common/bin/run_if_master.sh ${INSTANCE} /p4/common/bin/p4review.py ${INSTANCE} # Kill IDLE and Init tasks that sit too long. */10 * * * * [ -e /p4/common/bin ] && /p4/common/bin/p4master_run ${INSTANCE} /p4/common/bin/kill_idle.sh ${INSTANCE} # Replica Tasks # Verify # Run the replica verify quarterly. # Use the -P parameter to run a parallel verify on the replica servers. 5 21 * * 6 [ $(date +\%d) -le 07 ] && /p4/common/bin/run_if_replica.sh ${INSTANCE} /p4/common/bin/p4verify.sh ${INSTANCE} -P 8 */10 * * * * /p4/common/bin/run_if_replica.sh ${INSTANCE} /p4/common/bin/verify_shelves.sh ${INSTANCE} 50 # Sync checkpoints from master 0 8 * * * [ -e /p4/common/bin ] && /p4/common/bin/run_if_replica.sh ${INSTANCE} /p4/common/bin/sync_replica.sh ${INSTANCE} # Run recreate_db_checkpoint.sh on the first Saturday afternoon in Jan. and July. 5 18 * 1,4,7,10 6 [ $(date +\%d) -le 07 ] && /p4/common/bin/run_if_replica.sh ${INSTANCE} /p4/common/bin/recreate_db_sync_replica.sh ${INSTANCE} # If you can't run the scripts above due to rsync issues, then run this one instead. # 0 5 * * 0-5 [ -e /p4/common/bin ] && /p4/common/bin/run_if_replica.sh ${INSTANCE} /p4/common/bin/replica_cleanup.sh ${INSTANCE} # Replica Status */5 * * * * [ -e /p4/common/bin ] && /p4/common/bin/run_if_replica.sh ${INSTANCE} /p4/common/bin/replica_status.sh ${INSTANCE} > /dev/null */5 * * * * [ -e /p4/common/bin ] && /p4/common/bin/run_if_edge.sh ${INSTANCE} /p4/common/bin/replica_status.sh ${INSTANCE} > /dev/null # Cache Purge on Edge servers that use lbr.replication=cache # Comment out this line if you are not running with that config. */60 * * * * /p4/common/bin/run_if_edge.sh ${INSTANCE} /p4/common/bin/cacheclean.sh ${INSTANCE} # Clean structured logs that aren't rotating 0 1 * * * [ -e /p4/common/bin ] && /p4/common/bin/run_if_replica.sh ${INSTANCE} rm -f /p4/${INSTANCE}/logs/*.csv > /dev/null