Here is my suggestion:
1) Create a shell script `/home/yael/purgeabrt.sh`
$ cat purgeabrt.sh
#!/bin/bash
set -e
function cleanup()
{
systemctl start abrtd
systemctl start abrt-oops
}
trap cleanup EXIT
systemctl stop abrtd
systemctl stop abrt-oops
find /var/spool/abrt/ -type d -ctime +10 -exec abrt-cli rm {} \;
cleanup
2) Run the script as **root** :
sudo crontab -e
Add the line:
*/5 * * * * bash /home/yael/purgeabrt.sh
in order to execute the `cron` job every 5 minutes.
Edit:
`set -e` will terminate the execution of the script if a command exits with a non-zero status.
`trap cleanup EXIT` will catch signals that may be thrown to the script and executes the cleanup code.
**Note:** The call to `cleanup` in the scripts last line is probably unnecessary (redundant) but improves readability of the code.