l i n u x - u s e r s - g r o u p - o f - d a v i s
L U G O D
 
Next Meeting:
April 21: Google Glass
Next Installfest:
TBD
Latest News:
Mar. 18: Google Glass at LUGOD's April meeting
Page last updated:
2001 Dec 30 16:58

The following is an archive of a post made to our 'vox-tech mailing list' by one of its subscribers.

Report this post as spam:

(Enter your email address)
Re: [vox-tech] Cron Confusion
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [vox-tech] Cron Confusion


  • Subject: Re: [vox-tech] Cron Confusion
  • From: jdnewmil@MAPSdcn.davis.ca.us
  • Date: Wed, 29 Nov 2000 23:28:35 -0800
  • References: 3A25FCE6.94241162@ucdavis.edu

On Wed, 29 Nov 2000, Robert G. Scofield wrote:

> I'm sorry to be so vague in this request for help.  Here's the story.  I
> once complained that my files in /var/log were getting so big,
> especially "messages."  Someone said that Red Hat had a program to deal
> with this problem.  He said it was a cron job.  Apparently he discovered
> that my cron job was scheduled to be done at around 4 in the morning on
> Sundays when my computer is off.  So, he changed a file so that the cron
> job would run at 3:00 Sunday afternoon.
> 
> On Sundays now  the cron job generates new files in /var/log.  So,
> instead of just "messages" I get "messages.1" and "messages.2" etc.
> Every once in awhile I go in and remove all of the files that have
> numbers for extensions.  (Though after reading about logrotate I suspect
> that these files will be automatically deleted by some cron job.)
> 
> Here's the problem.  I'd like to find the cron file that was modified so
> that I can study it, and learn how to schedule the cron job for a
> different time.   But I can't find it anywhere.  The command crontab -l
> gives me the message that I have no crontab.  I can't find anything in
> the following directories that look like the cron file that was
> modified:  cron.d, cron.daily, cron.hourly, cron.monthly, cron.weekly,
> crontab.  Does anyone know where I might find this cron job file?

Start by su'ing to root.  Then use the "crontab -l" command to see what
root's schedule is set to.  Use "man 5 crontab" to learn the format of the
cron tables, and "man 1 crontab" to learn about modifying these
schedules.  Usually there will be things to do on a daily, weekly and
monthly basis, so such items are usually added to the basic "cron.daily"
scripts.  Often these are links to a single script that behaves
differently depending on how it was called or based on the presence of
files in a directory that get modified at appropriate intervals.  Thus,
tasks you want performed on that vaguely periodic manner should be
edited into that script.

Note that most versions of cron require you to edit crontabs using the
crontab program.  There are versions that don't require this (LRP uses
one), so you could modify /etc/crontab (root's schedule) or the user
schedules directly, but that is not the norm.

---------------------------------------------------------------------------
Jeff Newmiller                        The     .....       .....  Go Live...
DCN:<jdnewmil@dcn.davis.ca.us>        Basics: ##.#.       ##.#.  Live Go...
Work:<JeffN@endecon.com>              Live:   OO#.. Dead: OO#..  Playing
Research Engineer (Solar/Batteries            O.O#.       #.O#.  with
/Software/Embedded Controllers)               .OO#.       .OO#.  rocks...2k
---------------------------------------------------------------------------



LinkedIn
LUGOD Group on LinkedIn
Sign up for LUGOD event announcements
Your email address:
facebook
LUGOD Group on Facebook
'Like' LUGOD on Facebook:

Hosting provided by:
Sunset Systems
Sunset Systems offers preconfigured Linux systems, remote system administration and custom software development.

LUGOD: Linux Users' Group of Davis
PO Box 2082, Davis, CA 95617
Contact Us

LUGOD is a 501(c)7 non-profit organization
based in Davis, California
and serving the Sacramento area.
"Linux" is a trademark of Linus Torvalds.

Sponsored in part by:
Appahost Applications
For a significant contribution towards our projector, and a generous donation to allow us to continue meeting at the Davis Library.