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
(ya, I know, just BARELY)
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...
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"
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:
renice +19 -p $$ >/dev/null 2>&1
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.
Red Hat Fedora Core 3
The times and cron commands follow a set pattern or format.
This should help.
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.
|All times are GMT -5. The time now is 08:19 AM.|