Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am running RHEL5 and software RAID (mdadm). Currently I allow the 99-raid-check weekly cron script to run at the normal time (early Sunday morning). However, if the system is off during that time it will run when the system boots with a delay. Looking at the man page for anacrontab and /etc/anacrontab, I can see the current config is set to run every 7 days with a delay of 70 minutes for the cron.weekly scripts. I need to be able to predict when there will be high disk IO, so I want it to run early Sunday morning if it's on, or not at all. My question is, how can I prevent 99-raid-check just to wait until the following week to run and not utilize anacron?

share|improve this question
up vote 0 down vote accepted

The simplest option would be to modify your script to check for I/O load and only run if it is below a threshold. Use something like iostat and add a check in your script that will only run if I/O is below X. You can then leave the cron as is since the script itself will deal with checking the load.

share|improve this answer
thank you for your comment. However this would not fulfill my needs. The IO will spike when mdadm rebuilds the arrays, which is fine, but I want to be able to control the hours that it occurs. – user2789281 Sep 18 '13 at 14:58
@user2789281 if all you want tis for it to run Sunday morning or not at all, just use a normal crontab and give it a specific time. – terdon Sep 18 '13 at 15:02
yes, I think that's exactly what I will do since anacrontab doesn't read crontab. Thanks. – user2789281 Sep 18 '13 at 15:10

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.