systemd:systemd
Différences
Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
systemd:systemd [2017/05/20 15:14] – root | systemd:systemd [2017/11/08 20:55] (Version actuelle) – root | ||
---|---|---|---|
Ligne 72: | Ligne 72: | ||
$ sudo systemctl edit crond.service -full | $ sudo systemctl edit crond.service -full | ||
</ | </ | ||
+ | |||
+ | * Date pour timer : | ||
+ | < | ||
+ | Minimal form | ||
+ | Sat, | ||
+ | Mon,Sun 12-*-* 2, | ||
+ | Wed *-1 ==> Wed *-*-01 00:00:00 | ||
+ | Wed-Wed,Wed *-1 ==> Wed *-*-01 00:00:00 | ||
+ | Wed, 17:48 | ||
+ | Wed-Sat,Tue 12-10-15 1:2:3 ==> Tue-Sat 2012-10-15 01:02:03 | ||
+ | *-*-7 0:0:0 ==> *-*-07 00:00:00 | ||
+ | 10-15 ==> *-10-15 00:00:00 | ||
+ | monday *-12-* 17:00 ==> Mon *-12-* 17:00:00 | ||
+ | Mon,Fri *-*-3,1,2 *: | ||
+ | 12, | ||
+ | mon,fri *-1/2-1,3 *: | ||
+ | 03-05 08: | ||
+ | 08: | ||
+ | 05:40 ==> *-*-* 05:40:00 | ||
+ | Sat,Sun 12-05 08: | ||
+ | Sat,Sun 08: | ||
+ | 2003-03-05 05:40 | ||
+ | 2003-03-05 | ||
+ | 03-05 ==> *-03-05 00:00:00 | ||
+ | hourly | ||
+ | daily ==> *-*-* 00:00:00 | ||
+ | monthly | ||
+ | weekly | ||
+ | *: | ||
+ | </ | ||
+ | |||
+ | Some other options like **OnCalendar** are available : | ||
+ | * **OnActiveSec** defines a timer relative to the moment the timer itself is activated. | ||
+ | * **OnBootSec** defines a timer relative to when the machine was booted up. | ||
+ | * **OnStartupSec** defines a timer relative to when systemd was started. | ||
+ | * **OnUnitActiveSec** defines a timer relative to when the unit the timer is activating was last activated. | ||
+ | * **OnUnitInactiveSec** defines a timer relative to when the unit the timer is activating was last deactivated. | ||
+ | |||
+ | Exemple : | ||
+ | < | ||
+ | [Unit] | ||
+ | Description=Execute backup every day at midnight | ||
+ | |||
+ | [Timer] | ||
+ | OnCalendar=*-*-* 00:00:00 | ||
+ | Unit=backup.service | ||
+ | |||
+ | [Install] | ||
+ | WantedBy=multi-user.target | ||
+ | </ | ||
+ | |||
+ | * 2 moyens d' | ||
+ | * **loginctl enable-linger [user]** : Active les processus persistant pour le user donné (si pas de user alors user courant). L' | ||
+ | * Dans le fichier ''/ | ||
+ |
systemd/systemd.1495293288.txt.gz · Dernière modification : 2017/05/20 15:14 de root