Try this

#!/bin/bash
echo "aaaa"|mail -s "mail" [email protected]

save this file as /root/desktop/script.sh

chmod 655  /root/desktop/script.sh

# crontab -e

*/5 * * * * *   sh /root/desktop/script.sh


Hope you get an idea !!!


On Tue, Apr 26, 2011 at 7:47 AM, etika ahuja <[email protected]> wrote:

> hey
>
> iam trying to use cron.hourly
>
> i made a script pl.sh
> #!bash
> echo "aaaa"|mail -s "mail" [email protected]
> now i have made this file under /etc/cron.hourly
> and my hourly timer is set in the crontab file
> */5 * * * * root cd / && run-parts --report /etc/cron.hourly
> after doing all this i did
> sudo service cron stop
> sudo service cron start
> but its not working
>
> what could be the reason of cron.hourly not working
>
> --
> LUG@IITD - http://lug-iitd.org/Footer
>



-- 
Amit Maheshwari
Linux System Administrator
RHCE,MCSA,AFCEH,
New Delhi, INDIA
http://amitmaheshwari.in
http://technews.amitmaheshwari.in <http://amitmaheshwari.in/>
http://blog.onedollardata.com

-- 
LUG@IITD - http://lug-iitd.org/Footer

Reply via email to