I have written a very simple bash script that runs on Solaris10. It runs a command and then sends me the output via mailx. I can run it at the command line (sudoed as root) and it runs perfectly fine. I then set it up to run from cron. I will get an email with no text in it, and the commands have not executed. Why is this not working correctly via root's cron, but works fine via the shell?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.