1 |
neysx 06/02/20 12:33:47 |
2 |
|
3 |
Modified: xml/htdocs/doc/en cron-guide.xml |
4 |
Log: |
5 |
#123224 minor touch-ups |
6 |
|
7 |
Revision Changes Path |
8 |
1.13 +34 -28 xml/htdocs/doc/en/cron-guide.xml |
9 |
|
10 |
file : http://www.gentoo.org/cgi-bin/viewcvs.cgi/xml/htdocs/doc/en/cron-guide.xml?rev=1.13&content-type=text/x-cvsweb-markup&cvsroot=gentoo |
11 |
plain: http://www.gentoo.org/cgi-bin/viewcvs.cgi/xml/htdocs/doc/en/cron-guide.xml?rev=1.13&content-type=text/plain&cvsroot=gentoo |
12 |
diff : http://www.gentoo.org/cgi-bin/viewcvs.cgi/xml/htdocs/doc/en/cron-guide.xml.diff?r1=1.12&r2=1.13&cvsroot=gentoo |
13 |
|
14 |
Index: cron-guide.xml |
15 |
=================================================================== |
16 |
RCS file: /var/cvsroot/gentoo/xml/htdocs/doc/en/cron-guide.xml,v |
17 |
retrieving revision 1.12 |
18 |
retrieving revision 1.13 |
19 |
diff -u -r1.12 -r1.13 |
20 |
--- cron-guide.xml 18 Feb 2006 05:56:15 -0000 1.12 |
21 |
+++ cron-guide.xml 20 Feb 2006 12:33:47 -0000 1.13 |
22 |
@@ -1,5 +1,5 @@ |
23 |
<?xml version="1.0" encoding="UTF-8"?> |
24 |
-<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/cron-guide.xml,v 1.12 2006/02/18 05:56:15 fox2mike Exp $ --> |
25 |
+<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/cron-guide.xml,v 1.13 2006/02/20 12:33:47 neysx Exp $ --> |
26 |
<!DOCTYPE guide SYSTEM "/dtd/guide.dtd"> |
27 |
|
28 |
<guide link="/doc/en/cron-guide.xml"> |
29 |
@@ -20,8 +20,8 @@ |
30 |
<!-- See http://creativecommons.org/licenses/by-sa/2.5 --> |
31 |
<license/> |
32 |
|
33 |
-<version>1.6</version> |
34 |
-<date>2006-01-14</date> |
35 |
+<version>1.7</version> |
36 |
+<date>2006-02-20</date> |
37 |
|
38 |
<chapter> |
39 |
<title>Cron basics</title> |
40 |
@@ -46,11 +46,11 @@ |
41 |
<title>The de facto cron</title> |
42 |
<body> |
43 |
|
44 |
-<p> |
45 |
+<p> |
46 |
There are at least three cron implementations for you to choose from in |
47 |
Portage. All of them offer a similar interface, namely the use of |
48 |
<c>crontab</c> or a similar command. There is also a related utility called |
49 |
-Anacron which is meant to work with cron on systems that are not continuously |
50 |
+Anacron which is meant to work with cron on systems that are not continuously |
51 |
running. |
52 |
</p> |
53 |
|
54 |
@@ -195,8 +195,8 @@ |
55 |
|
56 |
<pre caption="Installing cron"> |
57 |
# <i>emerge dcron</i> |
58 |
-# <i>rc-update add dcron default</i> |
59 |
# <i>/etc/init.d/dcron start</i> |
60 |
+# <i>rc-update add dcron default</i> |
61 |
</pre> |
62 |
|
63 |
<p> |
64 |
@@ -206,8 +206,8 @@ |
65 |
|
66 |
<pre caption="Installing anacron"> |
67 |
# <i>emerge anacron</i> |
68 |
-# <i>rc-update add anacron default</i> |
69 |
# <i>/etc/init.d/anacron start</i> |
70 |
+# <i>rc-update add anacron default</i> |
71 |
</pre> |
72 |
|
73 |
</body> |
74 |
@@ -257,7 +257,8 @@ |
75 |
<note> |
76 |
Giving another user access to crontab does not let him run cron-jobs as root. |
77 |
If you want a user to be able to edit the root crontab, you should look into |
78 |
-<c>sudo</c>. |
79 |
+<c>sudo</c>. Please read our <uri link="/doc/en/sudo-guide.xml">Gentoo |
80 |
+Sudo(ers) Guide</uri> for more details. |
81 |
</note> |
82 |
|
83 |
<p> |
84 |
@@ -270,9 +271,14 @@ |
85 |
# <i>gpasswd -a wepy cron</i> |
86 |
</pre> |
87 |
|
88 |
+<note> |
89 |
+When adding a user to the cron group, make sure that the user log out and back |
90 |
+in for the group change to take effect. |
91 |
+</note> |
92 |
+ |
93 |
<p> |
94 |
If you're using <b>Dcron</b>, that's all you have to do to give a user access to |
95 |
-crontab. Dcron users may proceed to the next section |
96 |
+crontab. Dcron users may proceed to the next section |
97 |
<uri link="#scheduling">scheduling cron-jobs</uri>, all others will want to |
98 |
keep reading. |
99 |
</p> |
100 |
@@ -288,7 +294,7 @@ |
101 |
<b>If neither <path>/etc/fcron/fcron.allow</path> nor |
102 |
<path>/etc/fcron/fcron.deny</path> exist, all users in the cron group will be |
103 |
allowed to use crontab</b>. |
104 |
-fcron comes with a default <path>fcron.allow</path> which <b>allows all |
105 |
+fcron comes with a default <path>fcron.allow</path> which <b>allows all |
106 |
users</b> in the cron group access to fcrontab. |
107 |
</impo> |
108 |
|
109 |
@@ -307,7 +313,7 @@ |
110 |
|
111 |
<p> |
112 |
If you chose <b>Vixie cron</b>, you'll probably just want to edit |
113 |
-<path>/etc/cron.allow</path>. |
114 |
+<path>/etc/cron.allow</path>. |
115 |
</p> |
116 |
|
117 |
<impo> |
118 |
@@ -400,7 +406,7 @@ |
119 |
|
120 |
<pre caption="Examples"> |
121 |
<comment># Run /bin/false every minute year round</comment> |
122 |
-* * * * * /bin/false |
123 |
+* * * * * /bin/false |
124 |
|
125 |
<comment># Run /bin/false at 1:35 on the mon,tue,wed and the 4th of every month</comment> |
126 |
35 1 4 * mon-wed /bin/false |
127 |
@@ -427,9 +433,9 @@ |
128 |
<pre caption="Editing crons.cron"> |
129 |
$ <i>nano crons.cron</i> |
130 |
<comment>#Mins Hours Days Months Day of the week</comment> |
131 |
-10 3 1 1 * /bin/echo "i don't really like cron" |
132 |
-30 16 * 1,2 * /bin/echo "i like cron a little" |
133 |
-* * * 1-12/2 * /bin/echo "i really like cron" |
134 |
+10 3 1 1 * /bin/echo "I don't really like cron" |
135 |
+30 16 * 1,2 * /bin/echo "I like cron a little" |
136 |
+* * * 1-12/2 * /bin/echo "I really like cron" |
137 |
</pre> |
138 |
|
139 |
<p> |
140 |
@@ -442,12 +448,12 @@ |
141 |
</pre> |
142 |
|
143 |
<note> |
144 |
-You won't actually see the output from these echo commands unless you use |
145 |
+You won't actually see the output from these echo commands unless you use |
146 |
redirection. |
147 |
</note> |
148 |
|
149 |
<p> |
150 |
-To verify the cron-jobs you scheduled, we'll use the proper <e>list command</e> |
151 |
+To verify the cron-jobs you scheduled, we'll use the proper <e>list command</e> |
152 |
from the table above. |
153 |
</p> |
154 |
|
155 |
@@ -461,10 +467,10 @@ |
156 |
</p> |
157 |
|
158 |
<p> |
159 |
-This crontab should echo "i really like cron" every minute of every hour of |
160 |
+This crontab should echo "I really like cron" every minute of every hour of |
161 |
every day every other month. Obviously you would only do that if you really |
162 |
-liked cron. The crontab will also echo "i like cron a little" at 16:30 every |
163 |
-day in January and February. It will also echo "i don't really like cron" at |
164 |
+liked cron. The crontab will also echo "I like cron a little" at 16:30 every |
165 |
+day in January and February. It will also echo "I don't really like cron" at |
166 |
3:10 on the January 1st. |
167 |
</p> |
168 |
|
169 |
@@ -480,12 +486,12 @@ |
170 |
</p> |
171 |
|
172 |
<p> |
173 |
-For example, to have it run <c>echo "i like anacron"</c> every 5 days, 10 |
174 |
+For example, to have it run <c>echo "I like anacron"</c> every 5 days, 10 |
175 |
minutes after Anacron is started, you would have: |
176 |
</p> |
177 |
|
178 |
<pre caption="/etc/anacrontab"> |
179 |
-5 10 wasting-time /bin/echo "i like anacron" |
180 |
+5 10 wasting-time /bin/echo "I like anacron" |
181 |
</pre> |
182 |
|
183 |
<p> |
184 |
@@ -523,7 +529,7 @@ |
185 |
crontab. Most people will want to run <c>updatedb</c> on a weekly basis to |
186 |
make sure that <c>slocate</c> works properly. To add that to your crontab, |
187 |
let's first edit <path>crons.cron</path> again so that it looks like the |
188 |
-following: |
189 |
+following: |
190 |
</p> |
191 |
|
192 |
<pre caption="A real crontab"> |
193 |
@@ -547,7 +553,7 @@ |
194 |
using <c>crontab crons.cron</c> just as we did before, or you could use the |
195 |
proper <e>edit command</e> from the table above. This gives you a way to edit |
196 |
your user's crontab in situ, without depending on external files like |
197 |
-<path>crons.cron</path>. |
198 |
+<path>crons.cron</path>. |
199 |
</p> |
200 |
|
201 |
<pre caption="Editing a crontab in place"> |
202 |
@@ -641,16 +647,16 @@ |
203 |
<ul> |
204 |
<li> |
205 |
<b>Is cron running?</b><br/> |
206 |
- Run <c>ps ax | grep cron</c>, make sure it shows up! |
207 |
+ Run <c>ps ax | grep cron</c> and make sure it shows up! |
208 |
</li> |
209 |
<li> |
210 |
<b>Is cron working?</b><br/> |
211 |
- Try: * * * * * /bin/echo "foobar" >> /file_you_own, and make sure it |
212 |
+ Try: * * * * * /bin/echo "foobar" >> /file_you_own and make sure it |
213 |
works |
214 |
</li> |
215 |
<li> |
216 |
<b>Is your command working?</b><br/> |
217 |
- Try: * * * * * /bin/foobar > /file_you_own 2>&1, look for errors |
218 |
+ Try: * * * * * /bin/foobar > /file_you_own 2>&1 and look for errors |
219 |
in /file_you_own |
220 |
</li> |
221 |
<li> |
222 |
@@ -661,7 +667,7 @@ |
223 |
<li> |
224 |
<b>Are there any dead.letter's?</b><br/> |
225 |
cron usually sends mail when there's a problem, check your mail and also |
226 |
- look for ~/dead.letter |
227 |
+ look for <path>~/dead.letter</path>. |
228 |
</li> |
229 |
</ul> |
230 |
|
231 |
|
232 |
|
233 |
|
234 |
-- |
235 |
gentoo-doc-cvs@g.o mailing list |