LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 04-12-2012, 11:18 PM   #1
JJJCR
Senior Member
 
Registered: Apr 2010
Posts: 2,149

Rep: Reputation: 449Reputation: 449Reputation: 449Reputation: 449Reputation: 449
Smile check active cron's


hi gurus, how to check active cron schedule's?
is there a way to determine all cron jobs?

thanks in advance.
 
Old 04-12-2012, 11:39 PM   #2
roger_heslop
Member
 
Registered: Oct 2009
Location: Leander, TX
Distribution: Fedora 20
Posts: 97

Rep: Reputation: 35
I hate just answering the link, but I think this is perfect, check it out.

http://stackoverflow.com/questions/1...-for-all-users

Basically the command from that reference is this:
for user in $(cut -f1 -d: /etc/passwd); do crontab -u $user -l; done
 
Old 04-15-2012, 08:04 AM   #3
JJJCR
Senior Member
 
Registered: Apr 2010
Posts: 2,149

Original Poster
Rep: Reputation: 449Reputation: 449Reputation: 449Reputation: 449Reputation: 449
Thanks Roger, i found this one helpful as well. hope it might help someone else.

found it on this link: http://www.question-defense.com/2008...users-in-linux

In Linux you can list the contents of a users crontab from root by issuing the below command:

[root@server ~]#crontab -u username -l

How do you list crontabs for all of the users on your Linux server? The easiest way is to list the contents of /var/spool/cron which will provide you a list of all of the users that have cron entries. Then if you need the specific details of a users cron entries you can use the command above and replace username with the username in question to see the details.


Other places to look for cron specific tasks would be the below locations:
/etc/crontab – provides specific details for cron including what the hourly, daily, weekly, and yearly cron tasks
/etc/cron.hourly – directory with hourly cron tasks
/etc/cron.daily – directory with daily cron tasks
/etc/cron.weekly – directory with weekly cron tasks
/etc/cron.monthly – directory with monthly cron tasks
 
Old 04-17-2012, 12:37 AM   #4
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,358

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Actually, all cron job files are stored as ASCII text, so just cat them
 
  


Reply



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
Check if remote connection is active aarontwc Programming 8 11-12-2008 01:24 AM
how to check if port is active? Junior_DBA Linux - Newbie 4 11-06-2008 07:15 AM
how to check active sendmail user on linux ahpin Linux - Server 2 11-15-2006 06:31 PM
Strategy in PHP to check the number of active connections? vharishankar Programming 5 07-19-2005 08:14 AM
Check active /dev/sg* Devices carma Linux - Hardware 2 01-15-2005 12:17 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 04:18 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
Open Source Consulting | Domain Registration