cron, suite

This commit is contained in:
Jérémy Lecour 2017-06-19 23:59:14 +02:00 committed by Jérémy Lecour
parent 8401464fab
commit a80ce2e930

View file

@ -55,18 +55,18 @@
<h3>Les fichiers de cron</h3> <h3>Les fichiers de cron</h3>
<pre> <pre>
<code data-trim class="hljs nohighlight"> <code data-trim class="hljs nohighlight">
# systemctl status cron # systemctl status cron
</code> </code>
<code data-trim class="hljs nohighlight"> <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 data-trim> <code data-trim class="hljs nohighlight">
# 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>
@ -79,17 +79,15 @@
<code data-trim class="hljs nohighlight"> <code data-trim class="hljs nohighlight">
# 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 {} \; 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>
@ -110,37 +108,42 @@
</section> </section>
<section> <section>
<h2>ntpd</h2> <section>
<pre> <h2>ntpd</h2>
<code> </section>
$ date <section>
</code> <pre>
<code> <code>
# apt install ntp $ date
</code> </code>
<code> <code>
Fichier /etc/ntp.conf : # apt install ntp
</code> </code>
server ntp.evolix.net <code>
</pre> Fichier /etc/ntp.conf :
</code>
server ntp.evolix.net
</pre>
</section> </section>
<section> <section>
<h2>ntpd (suite)</h2> <h2>ntpd (suite)</h2>
<pre> <pre>
<code> <code>
# ntpq -p # ntpq -p
</code> </code>
<code> <code>
$ timedatectl $ timedatectl
</code> </code>
<code> <code>
# hwclock --show # hwclock --show
</code> </code>
<code> <code>
# hwclock --systohc # hwclock --systohc
</code> </code>
</pre> </pre>
</section>
</section> </section>
<section> <section>