How to check the user cronjobs who created 1 min or 5 min on the server
i had an script which detect 1 min cron jobs please someone help me to find out the cronjob created 5 min
i had an script which detect 1 min cron jobs please someone help me to find out the cronjob created 5 min
#!/bin/bash
ls -1 /var/spool/cron/| grep -v '^root'|while read u;
do
cat /var/spool/cron/${u}|\
awk '{print $1":"$2":"$3":"$4":"$5":"$NF}'|\
while read entry;
do
mn=$(echo ${entry}|awk -F':' '{print $1}');
if [[ ${mn} == "*" || ${mn} =~ "\*\/[0-5]$" ]];
then
echo "Minutely script found -> ${u} {$entry}";
fi;
done;
done;