Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
i searced google "using cron to run a script ubuntu" and found this website.
i also, did not have a mail program installed and had to install mailx. as soon as i did, my script (very much the same as yours, ie. using tar for backup) started working with cron. i have no clue why this is the case, but it worked 5 minutes after i installed mailx (i set cron to run 5 minutes after i installed mailx to test).
I also had this problem, and I can't believe mailx solved it!
I was beating my head up against the wall trying to figure this one out. And, after a bit of web searching, I came up on this page.
I figured, what do I have to lose?
After installing mailx, the tar backup script I wrote that would run perfectly fine manually but would never run properly with a cron worked beautifully. What a redicilous and obscure bug!
Thank you so much! Exact same problem with crontab, and adding mailx solved it immediately. I'd been trying to sort this out for a month, to no avail. If not for this forum, I'd likely be at it for another month, at least. What a bizarre fix -- but thanks nonetheless. I wouldn't have come up with it myself!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.