Fog Creek Software
Discussion Board

How to view existing Cron jobs?

How can I view existing cron jobs?

This is bugging me as a server I hereited occationally does quirky things - searches in google did not lead to an answer.



Sunday, August 22, 2004

cat crontab ?

Sunday, August 22, 2004

man crontab

then, depending on what you're wrestling, possibly

crontab -l

to list the table (and that's a lowercase L)

Sunday, August 22, 2004

"searches in google did not lead to an answer"

Watch it become another meaningless polite figure of speech. She tried hard, but couldn't find a crontab manpage on Google, my ass.

Monday, August 23, 2004

I've entered the _exact_ title of this thread into google and got 20,900 replies, the _second_ one being:

All About CRON Jobs
... Once this is done, you are all set to run a cron job. ... Crontab -l, ---
to list and view the content of existing cronfile. ... - 14k - Cached - Similar pages


Do I have a different Google than you?

Monday, August 23, 2004

20,900 answers are only useful if they answer the question and you are willing to look at all 20,900.  crontab -l only works if you are signed in as the person who created the cron entries (or root).

look at /var/spool/cron and it will show who has a crontab that can have entries.  You can then look for those entries and see what is running.  Here is a good reference page for what I think you want:

Monday, August 23, 2004

Actually I'm not even sure what you mean. I'd view existing crons with a suspicious eye for sure.

And isn't this great. You inherit a server with no documentation. Is it just not absolutely amazing that people can just throw shit in the closed and no one asks for an accounting??

I too inherited a bunch of servers. What a mess. I'm slowly documenting the whole kit and kaboodle in a wiki. Each box get's an entry where I show all crons, why they exist, what they do etc.

Were you on a linux box (most distros use the same I reckon) you can look in /var/spool/cron where it will list every user who has a cronfile.

They ought to be documented, right. I love the use of brain dead shell scripts as cron jobs. Is there a better language than Perl for cron jobs?

Monday, August 23, 2004


Write it in C and lose the source code.  Also give it a cryptic name like aa.exe.

Jonathan Briggs
Monday, August 23, 2004

To those who are suggesting that the OP look in /var/spool/crontab: on a sensibly configured system, that won't be readable by non-root users. If ordinary users can view each other's crontabs, something is wrong.

crontab -l is the most portable way to get at a user's crontab.

Anomalous Blowhard
Monday, August 23, 2004

I don't know.

Tuesday, August 24, 2004

Dont use crontab.  It is not bulletproof.

Use something like AutoSys

Wednesday, August 25, 2004

*  Recent Topics

*  Fog Creek Home