1CDIST-TYPE__CRON(7)                  cdist                 CDIST-TYPE__CRON(7)
2
3
4

NAME

6       cdist-type__cron - Installs and manages cron jobs
7

DESCRIPTION

9       This cdist type allows you to manage entries in a users crontab.
10

REQUIRED PARAMETERS

12       user   The user who's crontab is edited
13
14       command
15              The command to run.
16

OPTIONAL PARAMETERS

18       NOTE:  All  time-related  parameters  (--minute, --hour, --day_of_month
19       --month and --day_of_week) defaults to *, which means to execute it al‐
20       ways.  If  you set --hour 0 to execute the cronjob only at midnight, it
21       will execute every minute in the first hour of the morning all days.
22
23       state  Either present or absent. Defaults to present.
24
25       minute See crontab(5). Defaults to *
26
27       hour   See crontab(5). Defaults to *
28
29       day_of_month
30              See crontab(5). Defaults to *
31
32       month  See crontab(5). Defaults to *
33
34       day_of_week
35              See crontab(5). Defaults to *
36
37       raw    Take whatever the user  has  given  instead  of  time  and  date
38              fields.   If  given, all other time and date fields are ignored.
39              Can for example be used to specify cron EXTENSIONS like  reboot,
40              yearly  etc.  See crontab(5) for the extensions if any that your
41              cron implementation implements.
42
43       raw_command
44              Take whatever the user has given in the command and  ignore  ev‐
45              erything  else.  If given, the command will be added to crontab.
46              Can for example be  used  to  define  variables  like  SHELL  or
47              MAILTO.
48

EXAMPLES

50          # run Monday to Saturday at 23:15
51          __cron some-id --user root --command "/path/to/script" \
52             --hour 23 --minute 15 --day_of_week 1-6
53
54          # run on reboot
55          __cron some-id --user root --command "/path/to/script" \
56             --raw @reboot
57
58          # remove cronjob
59          __cron some-id --user root --command "/path/to/script" --state absent
60
61          # define default shell
62          __cron some-id --user root --raw_command --command "SHELL=/bin/bash" \
63             --state present
64

SEE ALSO

66       crontab(5)
67

AUTHORS

69       Steven Armstrong <steven-cdist--@--armstrong.cc>
70

COPYING

72       Copyright  (C)  2011-2013  Steven  Armstrong.  You  can redistribute it
73       and/or modify it under the terms of the GNU General Public  License  as
74       published  by the Free Software Foundation, either version 3 of the Li‐
75       cense, or (at your option) any later version.
76
78       ungleich GmbH 2021
79
80
81
82
837.0.0                            Jul 31, 2022              CDIST-TYPE__CRON(7)
Impressum