troubleshooting Question

crontab not working properly

Avatar of jaisonshereen
jaisonshereen asked on
Shell ScriptingRuby
2 Comments1 Solution398 ViewsLast Modified:
i have created a shell script shown below :

Its working properly when i executing through shell

but when i executed through crontab.

contents (body) of the mail is empty


Can u make out any problem ?

dflogs.sh
--------------
cat rs.log | grep '<' > /data/rs/applogs/dflogs.txt
mail -s "test" jaisonshereen@gmail.com < /data/rs/applogs/dflogs.txt
 
 
Crontab -e 
---------
 
5,10,15,20,25,26,27,28,29,30,31,32,33,34,35,40,45,50,51,52,53,54,55,56,57,58,59  * * * * /data/rs/applogs/dflogs.sh

Open in new window

ASKER CERTIFIED SOLUTION
jaisonshereen

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 2 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros