LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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 12-16-2013, 10:39 AM   #1
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,278

Rep: Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694
command to see current cron'ned jobs?


Morning.

I know quite a few locations for cron exist. /var/spool/cron, /etc/crontab, /etc/cron.d/* and et al.

Is there a simple command to list the currently recognized crons that are loaded? Such as this pseudo code:

Code:
cron --list-all-jobs
So i don't have to hunt down all the crazy locations and look through every .cron file?
 
Old 12-16-2013, 10:40 AM   #2
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fedora-35
Posts: 5,313

Rep: Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918
Code:
crontab -l
?
 
Old 12-16-2013, 10:43 AM   #3
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,278

Original Poster
Rep: Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694
no.

do this for proof, or a better view into what i mean.

Code:
echo "10 * * * * /bin/echo" >> /etc/cron.d/mynew.cron
then

Code:
crontab -l
See how that doesnt list all the active crons on your system?

Last edited by szboardstretcher; 12-16-2013 at 10:47 AM.
 
Old 12-16-2013, 11:55 AM   #4
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
something like:
Code:
# for i in /var/spool/cron/*; do echo ${i##*/}; sed 's/^//' $i; echo; done | grep -v "#"
?
 
1 members found this post helpful.
Old 12-18-2013, 09:44 AM   #5
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,278

Original Poster
Rep: Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694
Thank you. There are plenty of ways to do it with a script or oneliner.

I was interested to know if there was already a utility, as there always seems to be, to automatically tell us all of the things that are cronned from all the different places.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Where are cron jobs located when not under /var/spool/cron/root? NotionCommotion Linux - Newbie 6 09-07-2012 07:33 AM
Ned to send command output to email Thaidog Programming 2 11-21-2009 11:58 AM
cron hourly, daily, cron.d jobs don't execute eggsmartha Linux - General 3 09-17-2007 06:37 PM
Cron Jobs XaViaR Linux - General 1 06-23-2005 06:57 PM
CRON Jobs scottpioso Linux - Software 63 11-28-2003 06:45 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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