<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ca">
	<id>https://wiki.espai.de/index.php?action=history&amp;feed=atom&amp;title=Cron</id>
	<title>Cron - Historial de revisió</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.espai.de/index.php?action=history&amp;feed=atom&amp;title=Cron"/>
	<link rel="alternate" type="text/html" href="https://wiki.espai.de/index.php?title=Cron&amp;action=history"/>
	<updated>2026-05-27T17:34:01Z</updated>
	<subtitle>Historial de revisió per a aquesta pàgina del wiki</subtitle>
	<generator>MediaWiki 1.39.6</generator>
	<entry>
		<id>https://wiki.espai.de/index.php?title=Cron&amp;diff=1567&amp;oldid=prev</id>
		<title>Marti a 02:33, 12 gen 2017</title>
		<link rel="alternate" type="text/html" href="https://wiki.espai.de/index.php?title=Cron&amp;diff=1567&amp;oldid=prev"/>
		<updated>2017-01-12T02:33:51Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;ca&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Versió més antiga&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revisió del 02:33, 12 gen 2017&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l60&quot;&gt;Línia 60:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Línia 60:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;22 4 * * 0 root [ ! -f /etc/cron.hourly/0anacron ] &amp;amp;&amp;amp; run-parts /etc/cron.weekly&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;22 4 * * 0 root [ ! -f /etc/cron.hourly/0anacron ] &amp;amp;&amp;amp; run-parts /etc/cron.weekly&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;42 4 1 * * root [ ! -f /etc/cron.hourly/0anacron ] &amp;amp;&amp;amp; run-parts /etc/cron.monthly&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;42 4 1 * * root [ ! -f /etc/cron.hourly/0anacron ] &amp;amp;&amp;amp; run-parts /etc/cron.monthly&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;/&lt;/ins&gt;pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Marti</name></author>
	</entry>
	<entry>
		<id>https://wiki.espai.de/index.php?title=Cron&amp;diff=1566&amp;oldid=prev</id>
		<title>Marti: Es crea la pàgina amb « ==Crontab format== crontab -e &lt;pre&gt; # For details see man 4 crontabs  # Example of job definition: # .---------------- minute (0 - 59) # |  .------------- hour (0 - 2...».</title>
		<link rel="alternate" type="text/html" href="https://wiki.espai.de/index.php?title=Cron&amp;diff=1566&amp;oldid=prev"/>
		<updated>2017-01-12T02:33:08Z</updated>

		<summary type="html">&lt;p&gt;Es crea la pàgina amb « ==Crontab format== crontab -e &amp;lt;pre&amp;gt; # For details see man 4 crontabs  # Example of job definition: # .---------------- minute (0 - 59) # |  .------------- hour (0 - 2...».&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Pàgina nova&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;
==Crontab format==&lt;br /&gt;
crontab -e&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# For details see man 4 crontabs&lt;br /&gt;
&lt;br /&gt;
# Example of job definition:&lt;br /&gt;
# .---------------- minute (0 - 59)&lt;br /&gt;
# |  .------------- hour (0 - 23)&lt;br /&gt;
# |  |  .---------- day of month (1 - 31)&lt;br /&gt;
# |  |  |  .------- month (1 - 12) OR jan,feb,mar,apr ...&lt;br /&gt;
# |  |  |  |  .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat&lt;br /&gt;
# |  |  |  |  |&lt;br /&gt;
# *  *  *  *  * user-name  command to be executed&lt;br /&gt;
&lt;br /&gt;
# m h dom mon dow user	command&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== What executes /etc/cron.daily  weekly monthly hourly ? ==&lt;br /&gt;
&lt;br /&gt;
*'''crontab''' is running on memory&lt;br /&gt;
*'''anacron''' is run by periodically by crontab&lt;br /&gt;
&lt;br /&gt;
*/etc/cron.hourly is run by crontab (anacron only has precision of days)&lt;br /&gt;
&lt;br /&gt;
crontab runs cron.hourly which runs anacron which has /etc/anacron which run:&lt;br /&gt;
*/etc/cron.daily &lt;br /&gt;
*/etc/cron.weekly &lt;br /&gt;
*/etc/cron.monthly&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In a new Ubuntu you can see in /etc/crontab (not visible for sudo crontab -e):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# m h dom mon dow user	command&lt;br /&gt;
17 *	* * *	root    cd / &amp;amp;&amp;amp; run-parts --report /etc/cron.hourly&lt;br /&gt;
25 6	* * *	root	test -x /usr/sbin/anacron || ( cd / &amp;amp;&amp;amp; run-parts --report /etc/cron.daily )&lt;br /&gt;
47 6	* * 7	root	test -x /usr/sbin/anacron || ( cd / &amp;amp;&amp;amp; run-parts --report /etc/cron.weekly )&lt;br /&gt;
52 6	1 * *	root	test -x /usr/sbin/anacron || ( cd / &amp;amp;&amp;amp; run-parts --report /etc/cron.monthly )&lt;br /&gt;
#&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In Fedora there is a at /etc/cron.d/0hourly &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Run the hourly jobs&lt;br /&gt;
SHELL=/bin/bash&lt;br /&gt;
PATH=/sbin:/bin:/usr/sbin:/usr/bin&lt;br /&gt;
MAILTO=root&lt;br /&gt;
01 * * * * root run-parts /etc/cron.hourly&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and in /etc/cron.d/dailyjobs&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Run the daily, weekly, and monthly jobs if cronie-anacron is not installed&lt;br /&gt;
SHELL=/bin/bash&lt;br /&gt;
PATH=/sbin:/bin:/usr/sbin:/usr/bin&lt;br /&gt;
MAILTO=root&lt;br /&gt;
&lt;br /&gt;
# run-parts&lt;br /&gt;
02 4 * * * root [ ! -f /etc/cron.hourly/0anacron ] &amp;amp;&amp;amp; run-parts /etc/cron.daily&lt;br /&gt;
22 4 * * 0 root [ ! -f /etc/cron.hourly/0anacron ] &amp;amp;&amp;amp; run-parts /etc/cron.weekly&lt;br /&gt;
42 4 1 * * root [ ! -f /etc/cron.hourly/0anacron ] &amp;amp;&amp;amp; run-parts /etc/cron.monthly&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Cron vs Anacron==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Cron !! Anacron&lt;br /&gt;
|-&lt;br /&gt;
| Minimum granularity is minute (i.e Jobs can be scheduled to be executed every minute) || Minimum granularity is only in days&lt;br /&gt;
|-&lt;br /&gt;
| Cron job can be scheduled by any normal user ( if not restricted by super user ) || Anacron can be used only by super user ( but there are workarounds to make it usable by normal user )&lt;br /&gt;
|-&lt;br /&gt;
| Cron expects system to be running 24 x 7. If a job is scheduled, and system is down during that time, job is not executed. || Anacron doesn’t expect system to be running 24 x 7. If a job is scheduled, and system is down during that time, it start the jobs when the system comes back up.&lt;br /&gt;
|-&lt;br /&gt;
| Ideal for servers || Ideal for desktops and laptops&lt;br /&gt;
|-&lt;br /&gt;
| Use cron when a job has to be executed at a particular hour and minute || Use anacron when a job has to be executed irrespective of hour and minute&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
More info: http://www.thegeekstuff.com/2011/05/anacron-examples/&lt;/div&gt;</summary>
		<author><name>Marti</name></author>
	</entry>
</feed>