bash shell script to check all the cron jobs running for all cpanel users

vi /root/crondetails.sh

#!/bin/bash

cd /var/spool/cron

ls -1 > /cronusers

for i in ` cat /cronusers`

do

echo "#########################CRON DETAILS FOR USER $i " >> /crondetils
echo "" >> /crondetils
cat $i >> /crondetils
echo "" >> /crondetils
echo "####################################################" >>/crondetils
echo "" >> /crondetils

done

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.