1 |
fox2mike 06/02/18 05:56:15 |
2 |
|
3 |
Modified: xml/htdocs/doc/en cron-guide.xml |
4 |
Log: |
5 |
You're supposed to leave 1 space after every full stop, NOT 2. **No Content Change** |
6 |
|
7 |
Revision Changes Path |
8 |
1.12 +43 -43 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.12&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.12&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.11&r2=1.12&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.11 |
18 |
retrieving revision 1.12 |
19 |
diff -u -r1.11 -r1.12 |
20 |
--- cron-guide.xml 14 Jan 2006 17:04:52 -0000 1.11 |
21 |
+++ cron-guide.xml 18 Feb 2006 05:56:15 -0000 1.12 |
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.11 2006/01/14 17:04:52 fox2mike Exp $ --> |
25 |
+<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/cron-guide.xml,v 1.12 2006/02/18 05:56:15 fox2mike Exp $ --> |
26 |
<!DOCTYPE guide SYSTEM "/dtd/guide.dtd"> |
27 |
|
28 |
<guide link="/doc/en/cron-guide.xml"> |
29 |
@@ -31,7 +31,7 @@ |
30 |
|
31 |
<p> |
32 |
Cron is a daemon that runs scheduled tasks based on input from the command |
33 |
-<c>crontab</c>. It accomplishes this task by waking up every minute and |
34 |
+<c>crontab</c>. It accomplishes this task by waking up every minute and |
35 |
checking to see if there are any cron-jobs to run in any of the user crontabs. |
36 |
</p> |
37 |
|
38 |
@@ -48,8 +48,8 @@ |
39 |
|
40 |
<p> |
41 |
There are at least three cron implementations for you to choose from in |
42 |
-Portage. All of them offer a similar interface, namely the use of |
43 |
-<c>crontab</c> or a similar command. There is also a related utility called |
44 |
+Portage. All of them offer a similar interface, namely the use of |
45 |
+<c>crontab</c> or a similar command. There is also a related utility called |
46 |
Anacron which is meant to work with cron on systems that are not continuously |
47 |
running. |
48 |
</p> |
49 |
@@ -63,7 +63,7 @@ |
50 |
|
51 |
<p> |
52 |
Before we get started working with cron, you will have to choose which |
53 |
-implementation you want to use. For your convenience, I have collected |
54 |
+implementation you want to use. For your convenience, I have collected |
55 |
information about each one below. |
56 |
</p> |
57 |
|
58 |
@@ -78,10 +78,10 @@ |
59 |
<body> |
60 |
|
61 |
<p> |
62 |
-Vixie cron is a full featured cron implementation based on SysV cron. Each user |
63 |
+Vixie cron is a full featured cron implementation based on SysV cron. Each user |
64 |
has his own crontab and is allowed to specify environment variables within |
65 |
-that crontab. Unlike the other cron variants, it also offers support for |
66 |
-SELinux and PAM. It supports fewer architectures than Dcron, but more than |
67 |
+that crontab. Unlike the other cron variants, it also offers support for |
68 |
+SELinux and PAM. It supports fewer architectures than Dcron, but more than |
69 |
Fcron. |
70 |
</p> |
71 |
|
72 |
@@ -112,7 +112,7 @@ |
73 |
<body> |
74 |
|
75 |
<p> |
76 |
-Dcron aims to be a simple, elegant and secure implementation of cron. It does |
77 |
+Dcron aims to be a simple, elegant and secure implementation of cron. It does |
78 |
not allow the specification of environment variables in crontabs and all |
79 |
cron-jobs are run from <path>/bin/sh</path>. Like Vixie cron, each user has his |
80 |
own crontab. |
81 |
@@ -139,7 +139,7 @@ |
82 |
<body> |
83 |
|
84 |
<p> |
85 |
-Fcron aims at replacing Vixie cron and Anacron. It is designed to work on |
86 |
+Fcron aims at replacing Vixie cron and Anacron. It is designed to work on |
87 |
systems that are not continuously running and it is packed with extra features. |
88 |
It has job startup constraints, job serialization controls, the ability to |
89 |
assign nice values to jobs and the ability to schedule jobs to run at system |
90 |
@@ -173,9 +173,9 @@ |
91 |
|
92 |
<p> |
93 |
Anacron is not a cron daemon, it is something that usually works in |
94 |
-conjunction with one. It executes commands at intervals specified in days and |
95 |
+conjunction with one. It executes commands at intervals specified in days and |
96 |
it does not assume that the system is running continuously; it will run jobs |
97 |
-that were missed while the system was down. Anacron usually relies on a cron |
98 |
+that were missed while the system was down. Anacron usually relies on a cron |
99 |
daemon to run it each day. |
100 |
</p> |
101 |
|
102 |
@@ -219,9 +219,9 @@ |
103 |
<p> |
104 |
The post install messages from some of these cron packages tell you to run |
105 |
<c>crontab /etc/crontab</c>. The <path>/etc/crontab</path> file is your |
106 |
-<e>system crontab</e>. A cron installation can use it in conjunction with |
107 |
+<e>system crontab</e>. A cron installation can use it in conjunction with |
108 |
<c>sys-process/cronbase</c> to run the scripts in |
109 |
-<path>/etc/cron.{daily,hourly,weekly,monthly}</path>. Note that only |
110 |
+<path>/etc/cron.{daily,hourly,weekly,monthly}</path>. Note that only |
111 |
Vixie-cron schedules jobs in <path>/etc/crontab</path> automatically. Dcron and |
112 |
Fcron users will need to run <c>crontab /etc/crontab</c> every time they make |
113 |
changes to <path>/etc/crontab</path>. |
114 |
@@ -234,7 +234,7 @@ |
115 |
|
116 |
<p> |
117 |
Of course, you can choose not to use any system crontab at all. If you chose |
118 |
-Dcron or Fcron, do <e>not</e> run <c>crontab /etc/crontab</c>. If you chose |
119 |
+Dcron or Fcron, do <e>not</e> run <c>crontab /etc/crontab</c>. If you chose |
120 |
vixie-cron, you should comment all lines in <path>/etc/crontab</path>. |
121 |
</p> |
122 |
|
123 |
@@ -262,7 +262,7 @@ |
124 |
|
125 |
<p> |
126 |
No matter which cron package you use, if you want to allow a user to use |
127 |
-crontab, he will first have to be in the cron group. As an example, if you |
128 |
+crontab, he will first have to be in the cron group. As an example, if you |
129 |
wanted to add the user <e>wepy</e> to the cron group you would run: |
130 |
</p> |
131 |
|
132 |
@@ -272,14 +272,14 @@ |
133 |
|
134 |
<p> |
135 |
If you're using <b>Dcron</b>, that's all you have to do to give a user access to |
136 |
-crontab. Dcron users may proceed to the next section |
137 |
+crontab. Dcron users may proceed to the next section |
138 |
<uri link="#scheduling">scheduling cron-jobs</uri>, all others will want to |
139 |
keep reading. |
140 |
</p> |
141 |
|
142 |
<p> |
143 |
If you're using <b>Fcron</b>, you'll want to edit |
144 |
-<path>/etc/fcron/fcron.deny</path> and <path>/etc/fcron/fcron.allow</path>. The |
145 |
+<path>/etc/fcron/fcron.deny</path> and <path>/etc/fcron/fcron.allow</path>. The |
146 |
most secure way is to first deny everyone in <path>/etc/fcron/fcron.deny</path>, |
147 |
and then explicitly allow users in <path>/etc/fcron/fcron.allow</path>. |
148 |
</p> |
149 |
@@ -298,7 +298,7 @@ |
150 |
|
151 |
<p> |
152 |
Now, say we have a user <e>wepy</e> who should be able to schedule his own |
153 |
-cron-jobs. We would add him to <path>/etc/fcron/fcron.allow</path> as follows: |
154 |
+cron-jobs. We would add him to <path>/etc/fcron/fcron.allow</path> as follows: |
155 |
</p> |
156 |
|
157 |
<pre caption="Permissions in fcron.allow"> |
158 |
@@ -337,7 +337,7 @@ |
159 |
<p> |
160 |
The process of editing crontabs is different for each package, but they all |
161 |
support the same basic set of commands: adding and replacing crontabs, editing |
162 |
-crontabs, deleting crontabs, and listing cron-jobs in crontabs. The following |
163 |
+crontabs, deleting crontabs, and listing cron-jobs in crontabs. The following |
164 |
list shows you how to run those commands for each package. |
165 |
</p> |
166 |
|
167 |
@@ -383,12 +383,12 @@ |
168 |
|
169 |
<p> |
170 |
Before we can use any of these commands though, you first need to understand |
171 |
-the crontab itself. Each line in a crontab needs to specify five time fields |
172 |
+the crontab itself. Each line in a crontab needs to specify five time fields |
173 |
in the following order: the minutes (0-59), hours (0-23), days of the month |
174 |
(1-31), months (1-12), and days of the week (0-7, Monday is 1, Sunday is 0 and |
175 |
-7). The days of the weeks and months can be specified by three-letter |
176 |
-abbreviations like mon, tue, jan, feb, etc. Each field can also specify a |
177 |
-range of values (e.g. 1-5 or mon-fri), a comma separated list of values (e.g. |
178 |
+7). The days of the weeks and months can be specified by three-letter |
179 |
+abbreviations like mon, tue, jan, feb, etc. Each field can also specify a |
180 |
+range of values (e.g. 1-5 or mon-fri), a comma separated list of values (e.g. |
181 |
1,2,3 or mon,tue,wed) or a range of values with a <e>step</e> (e.g. 1-6/2 as |
182 |
1,3,5). |
183 |
</p> |
184 |
@@ -414,13 +414,13 @@ |
185 |
|
186 |
<note> |
187 |
Notice how you have to specify specific days of the week and days of the month |
188 |
-before they are combined. If you have * for only one of them, the other takes |
189 |
+before they are combined. If you have * for only one of them, the other takes |
190 |
precedence, while * for both just means every day. |
191 |
</note> |
192 |
|
193 |
<p> |
194 |
To test what we have just learned, let's go through the steps of actually |
195 |
-inputting a few cron-jobs. First, create a file called <path>crons.cron</path> |
196 |
+inputting a few cron-jobs. First, create a file called <path>crons.cron</path> |
197 |
and make it look like the this: |
198 |
</p> |
199 |
|
200 |
@@ -462,19 +462,19 @@ |
201 |
|
202 |
<p> |
203 |
This crontab should echo "i really like cron" every minute of every hour of |
204 |
-every day every other month. Obviously you would only do that if you really |
205 |
-liked cron. The crontab will also echo "i like cron a little" at 16:30 every |
206 |
-day in January and February. It will also echo "i don't really like cron" at |
207 |
+every day every other month. Obviously you would only do that if you really |
208 |
+liked cron. The crontab will also echo "i like cron a little" at 16:30 every |
209 |
+day in January and February. It will also echo "i don't really like cron" at |
210 |
3:10 on the January 1st. |
211 |
</p> |
212 |
|
213 |
<p> |
214 |
-If you are using Anacron, you should keep reading this section. Otherwise, |
215 |
+If you are using Anacron, you should keep reading this section. Otherwise, |
216 |
proceed to the next section on <uri link="#editing">editing crontabs</uri>. |
217 |
</p> |
218 |
|
219 |
<p> |
220 |
-Anacron users will want to edit <path>/etc/anacrontab</path>. This file has |
221 |
+Anacron users will want to edit <path>/etc/anacrontab</path>. This file has |
222 |
four fields: the number of days between each run, the delay in minutes after |
223 |
which it runs, the name of the job, and the command to run. |
224 |
</p> |
225 |
@@ -490,7 +490,7 @@ |
226 |
|
227 |
<p> |
228 |
Anacron exits after all of the jobs in anacrontab are done, so if we want it to |
229 |
-check these jobs every day, we will need to use cron. The instructions at the |
230 |
+check these jobs every day, we will need to use cron. The instructions at the |
231 |
end of the next section tell you how to do that. |
232 |
</p> |
233 |
|
234 |
@@ -502,8 +502,8 @@ |
235 |
|
236 |
<p> |
237 |
Let's be realistic though, you don't want your system telling you how much you |
238 |
-like cron every minute. As a step forward, let's remove that crontab using the |
239 |
-corresponding <e>remove command</e> from the table above. We will also list |
240 |
+like cron every minute. As a step forward, let's remove that crontab using the |
241 |
+corresponding <e>remove command</e> from the table above. We will also list |
242 |
the cron-jobs after, just to make sure it worked. |
243 |
</p> |
244 |
|
245 |
@@ -513,15 +513,15 @@ |
246 |
</pre> |
247 |
|
248 |
<p> |
249 |
-You should see no cron-jobs in the output from <c>crontab -l</c>. If you do see |
250 |
+You should see no cron-jobs in the output from <c>crontab -l</c>. If you do see |
251 |
jobs listed, that means we failed to remove the crontab, and that you should |
252 |
make sure that you used the correct <e>remove command</e> for your cron package. |
253 |
</p> |
254 |
|
255 |
<p> |
256 |
Now that we have a clean slate, let's put something useful into the <b>root</b> |
257 |
-crontab. Most people will want to run <c>updatedb</c> on a weekly basis to |
258 |
-make sure that <c>slocate</c> works properly. To add that to your crontab, |
259 |
+crontab. Most people will want to run <c>updatedb</c> on a weekly basis to |
260 |
+make sure that <c>slocate</c> works properly. To add that to your crontab, |
261 |
let's first edit <path>crons.cron</path> again so that it looks like the |
262 |
following: |
263 |
</p> |
264 |
@@ -543,9 +543,9 @@ |
265 |
|
266 |
<p> |
267 |
Now let's say that you also want to add <c>emerge --sync</c> to your daily |
268 |
-schedule. You could do this by first editing <path>crons.cron</path> and then |
269 |
+schedule. You could do this by first editing <path>crons.cron</path> and then |
270 |
using <c>crontab crons.cron</c> just as we did before, or you could use the |
271 |
-proper <e>edit command</e> from the table above. This gives you a way to edit |
272 |
+proper <e>edit command</e> from the table above. This gives you a way to edit |
273 |
your user's crontab in situ, without depending on external files like |
274 |
<path>crons.cron</path>. |
275 |
</p> |
276 |
@@ -555,7 +555,7 @@ |
277 |
</pre> |
278 |
|
279 |
<p> |
280 |
-That should open your user's crontab with an editor. We want to have <c>emerge |
281 |
+That should open your user's crontab with an editor. We want to have <c>emerge |
282 |
--sync</c> run every day at 6:30 A.M., so we'll make it look something like |
283 |
this: |
284 |
</p> |
285 |
@@ -569,7 +569,7 @@ |
286 |
|
287 |
<p> |
288 |
Again, check the cron-jobs list as we did in the previous examples to make sure |
289 |
-the jobs are scheduled. If they are all there, then you're all set. |
290 |
+the jobs are scheduled. If they are all there, then you're all set. |
291 |
</p> |
292 |
|
293 |
</body> |
294 |
@@ -583,7 +583,7 @@ |
295 |
|
296 |
<p> |
297 |
As mentioned earlier, all three of the available cron packages depend on |
298 |
-<c>sys-process/cronbase</c>. The cronbase package creates |
299 |
+<c>sys-process/cronbase</c>. The cronbase package creates |
300 |
<path>/etc/cron.{hourly,daily,weekly,monthly}</path>, and a script called |
301 |
<c>run-crons</c>. You might have noticed that the default |
302 |
<path>/etc/crontab</path> contains something like this: |
303 |
@@ -667,7 +667,7 @@ |
304 |
|
305 |
<p> |
306 |
Remember, each cron package is different and the range of features varies |
307 |
-greatly. Be sure to consult the man pages for crontab, fcrontab or anacrontab, |
308 |
+greatly. Be sure to consult the man pages for crontab, fcrontab or anacrontab, |
309 |
depending on what you use. |
310 |
</p> |
311 |
|
312 |
|
313 |
|
314 |
|
315 |
-- |
316 |
gentoo-doc-cvs@g.o mailing list |