reorganization de la partie cron

This commit is contained in:
Jérémy Lecour 2017-06-19 23:52:26 +02:00 committed by Jérémy Lecour
parent 0aff9297a6
commit 8401464fab

View file

@ -46,35 +46,40 @@
<h3>Administration système &amp; réseau &amp; sécurité</h3> <h3>Administration système &amp; réseau &amp; sécurité</h3>
</section> </section>
<section>
<section> <section>
<h2>Cron</h2> <h2>Cron</h2>
<pre>Les fichiers utiles :</pre> </section>
<section>
<h3>Les fichiers de cron</h3>
<pre> <pre>
<code> <code data-trim class="hljs nohighlight">
# systemctl status cron # systemctl status cron
</code>
<code data-trim class="hljs nohighlight">
# vim /etc/crontab # vim /etc/crontab
# vim /etc/default/cron # vim /etc/default/cron
</code> </code>
</pre> </pre>
<pre> <pre>
<code> <code data-trim>
# vim /etc/cron.d/example # vim /etc/cron.d/example
</code>
30 05 * * 0 www-data /usr/local/adm/savelog-weekly 30 05 * * 0 www-data /usr/local/adm/savelog-weekly
</code>
</pre> </pre>
</section> </section>
<section> <section>
<h2>Cron (suite)</h2>
<pre> <pre>
<code> <h3>Éditer une table</h3>
<code data-trim class="hljs nohighlight">
$ crontab -e $ crontab -e
</code> </code>
</pre> <code data-trim class="hljs nohighlight">
<pre>
<code>
# crontab -u jdoe -e # crontab -u jdoe -e
</code> </code>
<code data-trim class="hljs nohighlight">
0,30,45,51 * * * * /usr/local/adm/send-data 0,30,45,51 * * * * /usr/local/adm/send-data
*/15 * * * * /usr/local/adm/check-nis 1>/dev/null 2>&1 */15 * * * * /usr/local/adm/check-nis 1>/dev/null 2>&1
00 01 * * * nice -10 find /inf -name core -exec rm -f {} \; 00 01 * * * nice -10 find /inf -name core -exec rm -f {} \;
@ -84,21 +89,24 @@ $ crontab -e
00 00 1 1 * /usr/local/bin/happy-new-year 00 00 1 1 * /usr/local/bin/happy-new-year
MAILTO=alert@example.com MAILTO=alert@example.com
@daily /usr/local/bin/minuit-check @daily /usr/local/bin/minuit-check
</code>
</pre> </pre>
</section> </section>
<section> <section>
<h2>Cron (suite)</h2>
<pre> <pre>
<code> <h3>Documentation et consultation</h3>
<code data-trim class="hljs nohighlight">
$ man 5 crontab $ man 5 crontab
</code> </code>
<code> <code data-trim class="hljs nohighlight">
$ crontab -l $ crontab -l
</code> </code>
<code> <code data-trim class="hljs nohighlight">
# crontab -u jdoe -l # crontab -u jdoe -l
</code> </code>
</pre>
</section>
</section> </section>
<section> <section>