LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 03-21-2010, 01:40 PM   #1
psoheil
LQ Newbie
 
Registered: Mar 2010
Location: Chicago
Distribution: Redhat, CentOS, Ubuntu, Fedora
Posts: 22

Rep: Reputation: 0
Question Crontab Question


Hello All,

I have a crontab related question which I am hoping someone can answer. I recently took over a Redhat Enterprise 5 Server, and I was told by the previous Server Admin that there is a cron job that does the backups. I ran the following command to get a list of all users:

Code:
cat /etc/passwd | grep "/home" |cut -d: -f1
I then ran the following command for each of those users to see if they have any crontabs associated with them:

Code:
crontab -u USER -l
It doesn't show any crontab entries for any users (including root). But I am positive that there is a scheduled job somewhere because the backups are still running every night.

What am I missing here? Any help would be much appreciated.

Thanks,
Pete
 
Old 03-21-2010, 01:43 PM   #2
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
Take a look in the
Code:
/etc/cron*
directories
 
Old 03-21-2010, 01:54 PM   #3
psoheil
LQ Newbie
 
Registered: Mar 2010
Location: Chicago
Distribution: Redhat, CentOS, Ubuntu, Fedora
Posts: 22

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by repo View Post
Take a look in the
Code:
/etc/cron*
directories
Thank you very much for the quick response repo. I see the backup script in question in "/etc/cron.daily/sqlbackup". But it doesn't show under crontab. Does that mean the script file was manually created there?

Also, how do I find out what user the script executes under (is it the Owner user of the file)? Do any script files created in cron* folders automatically execute without entering crontab entry for them?

Thanks,
Pete
 
Old 03-21-2010, 02:05 PM   #4
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
Take a look at
http://www.debian-administration.org/articles/56
Best is to look at the script, to see what it does.
Files in cron.* are mostly executed as root, unless another user is setup in the script.
 
Old 03-21-2010, 02:08 PM   #5
mario.almeida
Member
 
Registered: May 2008
Location: India
Distribution: Ubuntu 10.04, CentOS, Manjaro
Posts: 179

Rep: Reputation: 27
Hi,

Check this file /etc/crontab
 
0 members found this post helpful.
Old 03-21-2010, 02:17 PM   #6
alunduil
Member
 
Registered: Feb 2005
Location: San Antonio, TX
Distribution: Gentoo
Posts: 684

Rep: Reputation: 62
I believe you're using vixie-cron which executes those directories as part of it's responsibilities without needing a system crontab.

Regards,

Alunduil
 
0 members found this post helpful.
Old 03-21-2010, 04:53 PM   #7
psoheil
LQ Newbie
 
Registered: Mar 2010
Location: Chicago
Distribution: Redhat, CentOS, Ubuntu, Fedora
Posts: 22

Original Poster
Rep: Reputation: 0
Thumbs up

Quote:
Originally Posted by repo View Post
Take a look at
http://www.debian-administration.org/articles/56
Best is to look at the script, to see what it does.
Files in cron.* are mostly executed as root, unless another user is setup in the script.
Thank you very much. This line answers my question:

Quote:
Except for the first one which is special, these directories allow scheduling of system-wide jobs in a coarse manner. Any script which is executable and placed inside them will run at the frequency which its name suggests.
 
  


Reply

Tags
crontabs



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
Crontab Question ballistic509 Debian 4 12-22-2006 05:27 PM
crontab question mmoor Fedora 5 05-20-2006 03:50 PM
Crontab question stefaandk Linux - Newbie 1 06-21-2005 07:31 AM
crontab question DriveMeCrazy Linux - Newbie 1 05-23-2004 12:25 PM
Crontab question mikeshn Linux - General 3 09-06-2003 06:26 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 10:18 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