Shell script to kill process Automatically after 3 days

I need script who automaticly will kill all (eggdrop,psybnc) processes on 3 days or 1 week

#!/bin/bash
# Days ago
DAYS="3"
PROCS="eggdrop|psybnc"

# Old date
AGO=$(date --date="$DAYS days ago" +"%b %d")

# Get pids 
PIDS=$(ps eaxo bsdstart,cmd,pid | egrep "^$AGO"' | egrep "$PROCS" | awk '{ print $4}')

# Now kill em
echo "Killing $PROCS process created $AGO days ago..."
kill -9 $PIDS

Tags: , , , , , , , ,