--- # Cron jobs for replica, standby, and edge-replica servers. - name: "Sync replica" ansible.builtin.cron: name: "Sync replica" minute: "0" hour: "12" job: "/p4/common/bin/run_if_replica.sh ${INSTANCE} /p4/common/bin/sync_replica.sh ${INSTANCE}" - name: "Recreate DB sync replica" ansible.builtin.cron: name: "Recreate DB Sync replica" minute: "5" hour: "22" weekday: "6" job: "[ $(date +\\%d) -le 07 ] && /p4/common/bin/run_if_replica.sh ${INSTANCE} /p4/common/bin/recreate_db_sync_replica.sh ${INSTANCE}" - name: "Replica status" ansible.builtin.cron: name: "Replica Status" minute: "*/6" job: "/p4/common/bin/run_if_replica.sh ${INSTANCE} /p4/common/bin/replica_status.sh ${INSTANCE} > /dev/null" # Replicas do not rotate structured logs (Perforce bug), so clear them here. - name: "Clear structured logs" ansible.builtin.cron: name: "Clear structured logs" minute: "0" hour: "1" job: "/p4/common/bin/run_if_replica.sh ${INSTANCE} rm -f /p4/${INSTANCE}/logs/*.csv > /dev/null"