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

@ -47,58 +47,66 @@
</section> </section>
<section> <section>
<h2>Cron</h2> <section>
<pre>Les fichiers utiles :</pre> <h2>Cron</h2>
</section>
<section>
<h3>Les fichiers de cron</h3>
<pre> <pre>
<code> <code data-trim class="hljs nohighlight">
# systemctl status cron # systemctl status cron
# vim /etc/crontab </code>
# vim /etc/default/cron <code data-trim class="hljs nohighlight">
# vim /etc/crontab
# vim /etc/default/cron
</code> </code>
</pre> </pre>
<pre> <pre>
<code> <code data-trim>
# vim /etc/cron.d/example # vim /etc/cron.d/example
30 05 * * 0 www-data /usr/local/adm/savelog-weekly
</code> </code>
30 05 * * 0 www-data /usr/local/adm/savelog-weekly </pre>
</pre> </section>
</section>
<section> <section>
<h2>Cron (suite)</h2> <pre>
<pre> <h3>Éditer une table</h3>
<code> <code data-trim class="hljs nohighlight">
$ crontab -e $ crontab -e
</code> </code>
</pre> <code data-trim class="hljs nohighlight">
<pre> # crontab -u jdoe -e
<code> </code>
# crontab -u jdoe -e <code data-trim class="hljs nohighlight">
</code> 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 {} \; 10 03 * * 1-6 nice -10 /usr/local/adm/sauvegarde-daily
10 03 * * 1-6 nice -10 /usr/local/adm/sauvegarde-daily 30 05 * * 0 /usr/local/adm/savelog-weekly
30 05 * * 0 /usr/local/adm/savelog-weekly 30 06 1 * * /usr/local/adm/savelog-monthly
30 06 1 * * /usr/local/adm/savelog-monthly 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> <h3>Documentation et consultation</h3>
<code> <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>