LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This 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

Reply
 
Search this Thread
Old 02-12-2005, 07:10 AM   #1
Archeantus
LQ Newbie
 
Registered: Feb 2005
Location: Orem Utah
Distribution: Fedora 12
Posts: 27

Rep: Reputation: 16
updatedb and slocate runs at 5am, how can I change this?


I just got a job that has me working way late (some would call it early though...) and since I've gotta be wide awake the whole time, I've gotta spend some time winding down before I hit the sack, so I've been poking around on the computer for a couple hours, before I'm tired enough to go to sleep. I've notice though, that a command called "updatedb" will run the "slocate" command and eat up quite a bit of resources between 4 and 5 or 5:30 am. Does anybody know how to list/change the pre-scheduled commands that Linux runs in the background?

Red Hate Fedora Core 3
500Mhz Celeron
256MB RAM
(ya, I know, just BARELY)

Thanks

-Kai
 
Old 02-12-2005, 08:22 AM   #2
DoubleOTeC
Member
 
Registered: Aug 2003
Location: Dominica
Distribution: RedHat, FC1, FC3, FC4
Posts: 266

Rep: Reputation: 30
I may be wrong...but aren't slocate and updatedb related?

The slocate cronjob i think runs updatedb.

But with regards to the times that they are run, those jobs are placed in the /etc/cron.daily folder i believe. The times that the /etc/cron.* folders are run are in /etc/crontab.

To separate or change times of individual commands, I believe you'd have to add a new and separate cronjob and remove the program from the folder that it is in.

lemme know if this helps...
 
Old 02-12-2005, 09:14 AM   #3
Archeantus
LQ Newbie
 
Registered: Feb 2005
Location: Orem Utah
Distribution: Fedora 12
Posts: 27

Original Poster
Rep: Reputation: 16
Cool

That helps out a ton....I'm just not sure how

I won't disagree that the /etc/crontab is where you change the time of day that the commands are run...I just don't know how to change them. Here's what I get when I "$ cat /etc/crontab"

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

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

I found lots of fun things in the /etc/cron* folders, now to just translate them into english, and get them to do what I want....

So how do I get the cron.daily folder to be run at 2 am, and not 4 am? I don't need to separate any of the files away from the others, just moving them all will be fine with me.

Oh, and updateb and slocate are related. "$ man updatedb" says "updatedb - update the sloacate database"

"$ cat /etc/cron.daily/slocate.cron" gives me this:

#!/bin/sh
. /etc/updatedb.conf
renice +19 -p $$ >/dev/null 2>&1
/usr/bin/updatedb


All I get out of this is that updatedb is being run with it's updatedb.conf file, and has been renice'd to (and I get sketchy here) make sure it gets precidence over all other programs running (which is why it eats up my resources.) Right?

Anything to help me change the time it runs, or understand more about cron and anacron and how they work would be very appreciated.

-Kai

Red Hat Fedora Core 3
500Mhz Celeron
256MB RAM
 
Old 02-12-2005, 10:43 AM   #4
DoubleOTeC
Member
 
Registered: Aug 2003
Location: Dominica
Distribution: RedHat, FC1, FC3, FC4
Posts: 266

Rep: Reputation: 30
The times and cron commands follow a set pattern or format.

This should help.

http://www.adminschoice.com/docs/crontab.htm

lemme know...
 
Old 02-12-2005, 05:06 PM   #5
Archeantus
LQ Newbie
 
Registered: Feb 2005
Location: Orem Utah
Distribution: Fedora 12
Posts: 27

Original Poster
Rep: Reputation: 16
Perfect! First thing on the page was the syntax on the /etc/crontab file. The Daily, Weekly, and Monthly events were all set for 4 am, now they're set for 2 : )

If it's not what it says it is, I'll let you know, but I think it'll work.

Thanks!

-Kai
 
  


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
What's the difference between 'updatedb' and 'updatedb&' ?? DreameR-X Linux - Newbie 4 12-18-2004 04:36 PM
Server crashes between 3am and 5am every morning abefroman Fedora - Installation 4 12-05-2004 06:30 PM
Quick slocate/updatedb question? King of Japan Linux - Newbie 4 08-29-2004 01:35 PM
How do you change what the /usr/sbin/service program runs? launchcode Red Hat 3 07-16-2004 01:18 PM
Using slocate in RH 7.2 hominy Linux - Newbie 1 08-10-2003 02:59 PM


All times are GMT -5. The time now is 12:27 PM.

Main Menu
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