Thanks for your reply, but will pg_basebackup generate a .backup file when scheduled in cron job so that i can give that as input to pg_archivecleanup. Also if i give archive_cleanup_command in recovery.conf will it check the presence of recovery.conf file automatically and execute the command from that file ?