If the requirement is to delete archive log backups automatically (without taking backup), then below shell script can be configured in crontab.
prepare the shell script.
cat rman_arch_del.sh
#!/bin/bash
export ORACLE_HOME=/oracle/app/oracle/product/12.1.0.2.0
export ORACLE_SID=PARIS12C
export PATH=$ORACLE_HOME/bin:$PATH
delBackup () {
rman log=/home/oracle/arch_del.log << EOF
connect target /
DELETE noprompt ARCHIVELOG ALL COMPLETED BEFORE ‘sysdate-1’;
CROSSCHECK ARCHIVELOG ALL;
DELETE EXPIRED ARCHIVELOG ALL;
exit
EOF
}
# Main
delBackup
Now configure in crontab:
00 22 * * * /u01/app/oracle/rman_arch_del.sh > /tmp/rmanarch.log
DELETE noprompt EXPIRED ARCHIVELOG ALL;