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.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi there,
my cron.daily always mails me that it has run (at least it tells me any errors that occured...) I added a new cron.weekly script, but it never runs. I can run it from the command line no problem, but not from cron.daily.
Why all the extra stuff in there? If you want it to run as root, be root and edit roots crontab. Here is a backup script I run nightly as root via cron:
0 3 * * * /usr/local/sbin/backup.sh
Try leaving out ''root run-parts', unless the errors seem related to the script (though it looks ok with a quick glance..) Posting the exact error would help
That's true but I'm abit confused as to what /mnt/rev refers to as he has an eject statement at the end. Thought that goes with a cdrom device and I don't see anything for writing to a cdrom.
Edit: and a tape device would normally be something like /dev/st0 or /dev/nst0
Also, one might expect to see a rewind command in there somewhere.
/bin/umount /mnt/rev
/usr/bin/eject /mnt/rev
Aside from that, did you remember to make the script executable?
Thanks for all of the interest in this post... :-)
Yes, /mnt/rev is in my /etc/fstab so I don't have to specify the device
Yes the script is executable - in fact, I put a copy of the script in /etc/cron.daily and it ran along with the rest of the daily scripts.
It all boils down to run-parts not firing on the weekly cron. I compared my crontab with others on the net and it is identical - at least to these old eyes :P
Your crontab looks fine to me. How about putting some other directory in the weekly line like this:
22 4 * * 0 root run-parts /etc/cron.daily
or
22 4 * * 0 root run-parts /etc/cron.adhoc
Or try adjusting the time to make it run daily or whatever. (Those numbers say: "run every sunday at 4:22 in the morning.") This way you can determine whether it's your cron or your filesystem that's causing the problem.
Maybe that 0 needs to be 7 or some extra script needs to be in every "run-parts" directory. What distro are you using?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.