LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > CentOS
User Name
Password
CentOS This forum is for the discussion of CentOS Linux. Note: This forum does not have any official participation.

Notices


Reply
  Search this Thread
Old 01-09-2016, 06:26 PM   #1
Rotwang2
Member
 
Registered: Aug 2014
Distribution: Ubuntu, Centos, Fedora
Posts: 210

Rep: Reputation: Disabled
Turning off the nightly cron


Hi, so, I have CentOS 6.something, it's old (I can find the exact number if you want but for this question I doubt it matters). I've had it for 8 years.

Every night at 4am it does it's maintence or whatever, and the drive starts crunching. I rarely every use it (it's a lan server I use for development).

So, can I set it to only run that like once a week? I know how to edit crons, but which cron is it?

Hard drive's been acting up lately, so maybe on the way to death soon, so I'll back up, obviously, but anyway, I'd rather not stress it.

Thanks guys,

rw
 
Old 01-09-2016, 07:03 PM   #2
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,780

Rep: Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214
It'a a bit hard to say without knowing which job in particular is causing the activity. I don't know of any default job that gets run at 4 AM. The default settings have the jobs in /etc/cron.daily started by anacron at a random time between 0305 and 0350. Most of those files could simply be moved to /etc/cron.weekly, though I'd suggest leaving the "0logwatch" and "logrotate" jobs where they are. Several of those jobs have the potential to cause a lot of activity, but normally don't unless the system has seen a lot of updates since the last run.

Of course any of the jobs in /var/spool/cron could be doing something at 4 AM, but since none of those are part of a standard installation, only you would know what is in there. Other possibilities include /etc/crontab and the files in /etc/cron.d, but again, a standard installation doesn't have anything in there that runs at 4 AM or, for that matter, that causes heavy activity.
 
1 members found this post helpful.
Old 01-09-2016, 09:30 PM   #3
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,341
Blog Entries: 28

Rep: Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145
As root, then as user, run crontab -l to list any cron jobs. If you find one, run crontab -e and remark them out with a #.

A web search for "default cron jobs debian" turned up no references to default cron jobs.

This article might help: https://www.debian-administration.or...ling_with_cron.
 
Old 01-09-2016, 09:44 PM   #4
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,780

Rep: Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214
Quote:
Originally Posted by frankbell View Post
A web search for "default cron jobs debian" ...
How is that relevant for what was stated to be a CentOS 6 installation?
 
Old 01-09-2016, 09:55 PM   #5
Sefyir
Member
 
Registered: Mar 2015
Distribution: Linux Mint
Posts: 634

Rep: Reputation: 316Reputation: 316Reputation: 316Reputation: 316
Quote:
Originally Posted by frankbell View Post
As root, then as user, run crontab -l to list any cron jobs. If you find one, run crontab -e and remark them out with a #.
Looks like its only for the current user.

Look in your /var/log/auth.log for something like these lines

Code:
Jan  9 18:39:01 localhost CRON[24263]: pam_unix(cron:session): session opened for user root by (uid=0)
Jan  9 18:39:01 localhost CRON[24263]: pam_unix(cron:session): session closed for user root
Look for something about 4am and make note of the user (bolded)
Then login to that user and run crontab -l and see which ones might be at 4am.
 
Old 01-12-2016, 01:12 PM   #6
Rotwang2
Member
 
Registered: Aug 2014
Distribution: Ubuntu, Centos, Fedora
Posts: 210

Original Poster
Rep: Reputation: Disabled
Thumbs up

Fixed it- When I read what rknichols said about it not being something in the standard distro, I dug in and found that it was rsnapshot running the daily iteration. A forehead-smacking moment for me.

Thanks all,

rw

Last edited by Rotwang2; 01-12-2016 at 01:13 PM.
 
  


Reply

Tags
lan, server



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Cron Job Nightly Email Question extravaganzasd Linux - Newbie 1 08-23-2011 03:16 AM
Strange Cron directories: /var/spool/cron/cron.GfqqGO Woodsman Slackware 4 05-11-2011 02:37 PM
adding a perl script to cron.daily / cron.d to setup a cron job CrontabNewBIE Linux - Software 6 01-14-2008 08:16 AM
cron not working from crontab nor form /etc/cron/cron.d. What did SuSE change? JZL240I-U SUSE / openSUSE 11 01-04-2007 01:57 AM
cron nightly backup to ftp server rkane Linux - Networking 2 03-04-2004 05:05 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > CentOS

All times are GMT -5. The time now is 04:12 AM.

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
Open Source Consulting | Domain Registration