Echo Snippet

Kick 'n'Dirty



CSS 8 DNS 1 SQL 1 ajax 1 apache 3 bash 11 convert 3 crontab 2 css 1 error 1 fail2ban 2 gogs 1 grav 1 htaccess 3 html 13 ip 8 iptables 2 js 6 mail 2 nano 2 netatmo 1 php 42 php4 1 php5 2 php7 1 plex 1 powershell 1 regex 1 rss 3 secu 2 shell 26 ssl 2 stylus 3 tls 1 windows 1 youtube 2

.

crontab

Aide Crontab

  ┌────────── minute (0 - 59)
  │ ┌──────── hour (0 - 23)
  │ │ ┌────── day of month (1 - 31)
  │ │ │ ┌──── month (1 - 12)
  │ │ │ │ ┌── day of week (0 - 6 => Sunday - Saturday, or  1 - 7 => Monday - Sunday)
  │ │ │ │ │
  ↓ ↓ ↓ ↓ ↓
  * * * * *      command to be executed
         
         
  58 23 * * *    /sbin/iptables-save  > /etc/firewall.iptables-cron 2>&1

string         meaning
------         -------
@reboot        Run once, at startup.
@yearly        Run once a year, "0 0 1 1 *".
@annually      (same as @yearly)
@monthly       Run once a month, "0 0 1 * *".
@weekly        Run once a week, "0 0 * * 0".
@daily         Run once a day, "0 0 * * *".
@midnight      (same as @daily)
@hourly        Run once an hour, "0 * * * *".

#####

Hope it will help ;)


crontab shell

<iframe width="100%" height="686" src="https://snippet.echosystem.fr?embed=5bdf4d0790a8e" type="text/html"></iframe>

Texte seul - Permalink - Snippet public posté le 03/11/2021

[bash] list all cron for all user

#!/bin/sh


# Check  crontab from all user

for user in $(cut -f1 -d: /etc/passwd); do crontab -u $user -l; done

crontab shell

<iframe width="100%" height="290" src="https://snippet.echosystem.fr?embed=5a5d4e2aaf0a8" type="text/html"></iframe>

Texte seul - Permalink - Snippet public posté le 02/11/2021

Flux RSS de cette page


Echo Snippet 1.84 par Bronco - Page générée en 0.009 s