Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 65726 - A good cron setup howto is needed
Summary: A good cron setup howto is needed
Status: RESOLVED FIXED
Alias: None
Product: [OLD] Docs-user
Classification: Unclassified
Component: Handbook (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Xavier Neys (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-09-28 14:29 UTC by postmodern
Modified: 2004-12-03 04:30 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
cron-guide (cron-guide.xml,11.12 KB, text/plain)
2004-11-13 16:16 UTC, Eric Brown
Details
cron-guide.xml (cron-guide.xml,14.28 KB, text/plain)
2004-11-13 20:58 UTC, Eric Brown
Details
cron-guide.xml (2) (cron-guide.xml,15.69 KB, text/plain)
2004-11-14 12:40 UTC, Eric Brown
Details
cron-guide.xml (3) (cron-guide.xml,16.16 KB, text/plain)
2004-11-17 15:34 UTC, Eric Brown
Details
/doc/en/cron-guide.xml (cron-guide.xml,16.07 KB, text/plain)
2004-11-21 09:37 UTC, Xavier Neys (RETIRED)
Details
cron-guide.xml (4) (cron-guide.xml,16.63 KB, text/plain)
2004-12-02 16:30 UTC, Eric Brown
Details
/doc/en/cron-guide.xml (cron-guide.xml,16.60 KB, text/plain)
2004-12-03 04:12 UTC, Xavier Neys (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description postmodern 2004-09-28 14:29:39 UTC
A good cron howto is needed to explain the crontab format for novice users.

Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Comment 1 Eric Brown 2004-11-10 13:19:42 UTC
I will do this..
Comment 2 Eric Brown 2004-11-13 16:16:58 UTC
Created attachment 43891 [details]
cron-guide

cron-guide so far..

I am still going over this and verifying the code blocks...

Any suggestions?
Comment 3 postmodern 2004-11-13 16:22:08 UTC
Looks very good so far. I would spend some time in the document explaining the time fields in /etc/crontab and how they will effect the execution of commands.
Comment 4 Eric Brown 2004-11-13 16:40:10 UTC
good idea =)


hmm, I think i was mistaken about dcron, it might have multipl crontabs =) doh!
Comment 5 postmodern 2004-11-13 16:42:57 UTC
If I'm not mistaken I think some cron tabs support extra time/option fields then others, might be something to check for as well. Also it would help to drive home the format of crontab to readers by labeling each field in every code block.
Comment 6 Eric Brown 2004-11-13 20:58:44 UTC
Created attachment 43903 [details]
cron-guide.xml

I tried to make the fields a little clearer by giving a few more examples.
I was also able to add more information about ranged input and steps.  The
first was was also erroneous with regards to what I thought the time fields
meant.

This version gives examples that should work on all crons.  I do realize that
fcron almost supports a syntax of its own because it's so much larger than the
other crons, but I won't put that in here unless you guys really think there
should be a special "Advanced" section taht goes into more detail about each
cron package.

I still haven't actually tested the examples on all three crons, but I think by
tomorrow I will be able to have that complete.

Let me know what you think I should change, this is my first doc submission,
and I could certainly use advice. =)
Comment 7 postmodern 2004-11-13 22:34:46 UTC
I would remove the line "  The choices are <c>vixie-cron</c>, <c>dcron</c>, and <c>fcron</c>." since you already stated the cron variants above.

I really like the run through on the time fields. Most Gentoo documentation is rather sparse, which does not do cron justice for the newcomer. I hope the doc team will be gentle with your work and get it onto the doc page quickly.
Comment 8 Xavier Neys (RETIRED) gentoo-dev 2004-11-14 03:38:42 UTC
Eric, tell us when you consider your guide to be good for mass-market ;-)
I'll be your editor. Very good guide IMO.

Minor glitches:
 days=1-5/2 is not every Monday, Tuesday and Thursday
 days are numbered 0-7 (not 1-7), 0 & 7 being Sunday
 s/her/his/
Comment 9 Eric Brown 2004-11-14 12:40:19 UTC
Created attachment 43949 [details]
cron-guide.xml (2)

I went over most of the examples and made sure they work in al three crons.
I also made various changes, there were still a few subtle errors.

At this point, I think I'm willing to leave it in Xavier's hands, but just let
me know if there's anything else I need to do.
Comment 10 Eric Brown 2004-11-17 13:52:58 UTC
hold on..
i found a bug =)

I found vixie-cron using /etc/crontab, i'll have to correct the howto to explain this
(oddly, those cron-jobs don't show up in crontab -l)
Comment 11 Eric Brown 2004-11-17 15:34:17 UTC
Created attachment 44194 [details]
cron-guide.xml (3)

I added a blurb about how some packages use /etc/crontab, and added a line to
help them comment out all of the cron-jobs listed there.

I think I am done with this doc..
Comment 12 Xavier Neys (RETIRED) gentoo-dev 2004-11-21 09:37:07 UTC
Created attachment 44420 [details]
/doc/en/cron-guide.xml

Edited version, mostly cosmetic changes.

BTW, why disable the system crontab completely? Why not explain how it is used
by default on most Gentoo boxes (/etc/cron.{hour,dai,week,month}ly/) ?
Or at least explain how to keep those scripts running if a user decides to
comment /etc/crontab's actions.

What do you think?
Comment 13 Eric Brown 2004-11-21 20:03:32 UTC
I knew you would say that =)

I was just not sure which versions of cron would use it at the time, some have to run the crontab command on it, some don't...

I am willing to fix that up a little bit though, so I'll look into it this week when I get around to it.
Comment 14 Eric Brown 2004-12-02 16:30:10 UTC
Created attachment 45178 [details]
cron-guide.xml (4)

I fixed it up the part about /etc/crontab by giving a better description of
what it does, and how to enable/disable cron-jobs listed there.  It's really
just Vixie-cron that automagically uses it.

Also, xsltproc is not using the &nbsp;'s added in lines 339, 340, 341 and 342:
cron-guide.xml:342: parser error : Entity 'nbsp' not defined
 I see how the entries in that table could certainly use spaces there, but
maybe we should remove them?
Comment 15 Xavier Neys (RETIRED) gentoo-dev 2004-12-03 04:12:28 UTC
Created attachment 45196 [details]
/doc/en/cron-guide.xml

Committed version.
I rephrased the part about /etc/crontab.
I just thought commenting it out would be more confusing than just telling
users crontab -l does not list its jobs.
Please file a patch against the current version in a new bug if you would like
to make changes.
Comment 16 Xavier Neys (RETIRED) gentoo-dev 2004-12-03 04:30:14 UTC
Quick note about those &nbsp; (generated html should define a margin, later)
Entities like &nbsp; are defined in guide.dtd
You receive a warning because xsltproc cannot find it at /dtd/guide.dtd
The easiest way is to add the following line to your /etc/xml/catalog before </catalog>:
  <rewriteURI uriStartString="/dtd/" rewritePrefix="/usr/portage/metadata/dtd/"/>

Try it out with xsltproc
That will also allow you to validate your files e.g.:
xmllint --noout --valid cron-guide.xml

cron-guide should show up on www.g.o

Many thanks for your work.