Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

El Capitano

macrumors member
Original poster
Jan 6, 2004
51
0
Spotlight's insistence on thrashing my hard drive and slowing my Mac to a crawl bugs the heck out of me, and seemingly many others. On the other hand, I do genuinely find Spotlight useful.

So I'd like to tell it to update the indexes daily, at a time of my choosing, rather than at a time of its own choosing (usually when I'm trying to do something important). I can survive without being able to search for files I downloaded four hours ago... I should be able to remember where they are. ;)

I've tried adding this to the root crontab:

15 0 * * * mdutil -a -i on
0 8 * * * mdutil -a -i off

In other words, turn indexing on at 00.15am, and back off at 08.00am.

Unfortunately, this appears to make Spotlight completely unusable during "off" hours, and force a complete re-index when it's turned back on. All I want to do is stop mds/mdworker from running during the day, not disable Spotlight entirely.

Any thoughts? I guess I could do something hacky like symlinking mds and mdworker to a script that checks the time and quits if it's an "off" time, but there should be a more elegant way of doing it.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.