LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva
User Name
Password
Mandriva This Forum is for the discussion of Mandriva (Mandrake) Linux.

Notices



Reply
 
Search this Thread
Old 10-01-2004, 05:43 PM   #1
Snump
Member
 
Registered: Sep 2004
Location: Pennsylvania, USA
Distribution: Trying to decide
Posts: 229

Rep: Reputation: 30
Cron Entry tor updatedb?


How does the cron directory work? If files on the hard drive change, which file should I put it in? Is there a consensus between everyone?
 
Old 10-01-2004, 09:39 PM   #2
CroMagnon
Member
 
Registered: Sep 2004
Location: New Zealand
Distribution: Debian
Posts: 900

Rep: Reputation: 33
Run updatedb via root's crontab, at whatever times are appropriate for you... I like to run it once a day at 5am when no-one will be using the computer (heavy disk access kills the responsiveness of my system). Since cron runs programs periodically, there's always going to be some sort of delay between adding new files and being able to find them with locate - the only way to avoid that is to run updatedb yourself if you've just added or moved files you want to find.
 
Old 10-02-2004, 12:22 AM   #3
Snump
Member
 
Registered: Sep 2004
Location: Pennsylvania, USA
Distribution: Trying to decide
Posts: 229

Original Poster
Rep: Reputation: 30
Like this?

SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
HOME=/

# run-parts
01 * * * * root nice -n 19 run-parts /etc/cron.hourly
02 4 * * * root nice -n 19 run-parts /etc/cron.daily
22 4 * * 0 root nice -n 19 run-parts /etc/cron.weekly
42 4 1 * * root nice -n 19 run-parts /etc/cron.monthly
59 4 * * * root updatedb

What about running it at boot?
 
Old 10-02-2004, 06:37 AM   #4
CroMagnon
Member
 
Registered: Sep 2004
Location: New Zealand
Distribution: Debian
Posts: 900

Rep: Reputation: 33
That looks about right!

As for running at boot time, that depends on your system. Have a look in /etc/init.d for a script that sounds like it runs at boot time (e.g one of mine is bootmisc.sh)
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
updatedb daily cron job TranceDude Linux - Software 12 08-25-2005 01:09 PM
script automatically add entry in cron daemon? Thinking Linux - General 1 03-30-2005 06:27 AM
What's the difference between 'updatedb' and 'updatedb&' ?? DreameR-X Linux - Newbie 4 12-18-2004 05:36 PM
how to make a cron entry? (perl) akaash Programming 2 05-06-2004 03:15 AM
hosts entry for a lan unit with no dns entry linxtc Linux - Networking 1 10-03-2003 09:05 AM


All times are GMT -5. The time now is 04:48 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration