-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #17 from jrha/17.8.0
Add 17.8.0 documentation
- Loading branch information
Showing
16 changed files
with
346 additions
and
517 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
|
||
### NAME | ||
|
||
cron -- NCM component to control cron entries for Linux and Solaris. | ||
`ncm-cron` -- NCM component to control cron entries for Linux and Solaris. | ||
|
||
### DESCRIPTION | ||
|
||
|
@@ -10,138 +10,41 @@ and the `/var/spool/cron/crontabs` directory on Solaris. | |
|
||
#### Linux | ||
|
||
> Files managed by ncm-cron will have the ncm-cron.cron suffix. Other files in | ||
> the directory are not affected by this component. The name of each file will be | ||
> taken from the nlist `name`. | ||
Files managed by `ncm-cron` will have the `.ncm-cron.cron` suffix. Other files in | ||
the directory are not affected by this component. The name of each file will be | ||
taken from the `name` attribute. | ||
|
||
#### Solaris | ||
|
||
> Solaris uses an older version of cron that does not make use of a cron.d | ||
> directory for crontabs. Ncm-cron **shares** the crontab with each user. To make | ||
> this work ncm-cron uses the concept of separate file **sections** within the | ||
> crontab. Each **section** is identified by the use of the tags `NCM-CRON BEGIN:` | ||
> and `NCM-CRON END:`. Entries either side of these section identifiers are not | ||
> modified. | ||
> | ||
> Solaris **does** have a `/etc/cron.d` directory, however it uses this directory | ||
> for control files such as `cron.allow` and `cron.deny`. | ||
Solaris uses an older version of cron that does not make use of a cron.d | ||
directory for crontabs. `ncm-cron` **shares** the crontab with each user. To make | ||
this work `ncm-cron` uses the concept of separate file **sections** within the | ||
crontab. Each **section** is identified by the use of the tags `NCM-CRON BEGIN:` | ||
and `NCM-CRON END:`. Entries either side of these section identifiers are not | ||
modified. | ||
|
||
### MAIN RESOURCES | ||
|
||
#### `/software/components/cron/entries` | ||
|
||
A list containing cron structures (described above). | ||
|
||
### ENTRY RESOURCES | ||
|
||
Each cron entry in the `/software/components/cron/entries` list may | ||
contain the properties and resources described below. One of `frequency` | ||
or `timing` must be specified. | ||
|
||
- **command** : string (required) | ||
|
||
Command line to execute, including all its options. | ||
|
||
Default : None | ||
|
||
- **comment** : string (optional) | ||
|
||
An optional comment to add at the beginning of the cron file. | ||
|
||
Default : None | ||
|
||
- **env** : nlist (optional) | ||
|
||
An optional nlist containing environment variable that must be | ||
defined before executing the command. Key is | ||
the variable name, value is variable value. | ||
|
||
Default : None | ||
|
||
- **frequency** : string (optional) | ||
|
||
Execution frequency for the command, using standard cron syntax. | ||
Minutes field can be `AUTO :` in this case, | ||
a random value between 0 and 59 inclusive is generated. | ||
This can be used to avoid too many machines executing the same | ||
cron at the same time. See also the `timing` element. | ||
|
||
Default : None | ||
|
||
- **group** : string (optional) | ||
|
||
Group to use to run the command. Defaults to user's primary group. | ||
|
||
Default : user's primary group | ||
|
||
- **log** : nlist (optional) | ||
|
||
A nlist allowing to define specific attributes for cron log file. | ||
Supported attributes are : | ||
|
||
- name | ||
|
||
Name of the log file. If the name is not an absolute file name, file is created in `/var/log`. | ||
Default name is the cron file name with .log extension in `/var/log`. | ||
|
||
- owner | ||
|
||
Owner/group of the log file, using `owner:group` format. group can be ommitted. | ||
|
||
- mode | ||
|
||
Permissions of log file specified as a string interpreted as an octal number. | ||
|
||
- disabled | ||
|
||
A boolean value disabling the redirection of script output/error to a log file | ||
|
||
- **name** : string (required) | ||
|
||
Name of the cron entry file to create. | ||
|
||
Default : None | ||
|
||
- **timing** : nlist (optional) | ||
|
||
If the `timing` nlist is used to specify the time, it can contain any of the | ||
keys: `minute`, `hour`, `day`, `month` and `weekday`. An unspecified key will | ||
have a value of `*`. A further key of 'smear' can be used to specify (in | ||
minutes) a maximum interval for smearing the start time, which can be as much | ||
as a day. When a smeared job is created, a random increment between zero and | ||
the smear time is applied to the start time of the job. If the start time | ||
results in the job running on the following day, then all other fields (day, | ||
weekday, etc) will be suitably modified. When smearing is specified, then the | ||
start minute (and possibly hour, if smear is more than one hour) must be | ||
specified as a simple absolute (e.g. '2') and cannot be variations such as | ||
lists or ranges. Time specifications such as ranges, lists and steps are | ||
supported except for named values (e.g. "1" must be used instead of "mon"). | ||
|
||
- **user** : string (optional) | ||
|
||
User to use to run the command. | ||
|
||
Default : root | ||
Solaris **does** have a `/etc/cron.d` directory, however it uses this directory | ||
for control files such as `cron.allow` and `cron.deny`. | ||
|
||
### EXAMPLE | ||
|
||
"/software/components/cron/entries" = list( | ||
nlist( | ||
"name","ls", | ||
"user","root", | ||
"group","root", | ||
dict( | ||
"name", "ls", | ||
"user", "root", | ||
"group", "root", | ||
"frequency", "*/2 * * * *", | ||
"command", "/bin/ls"), | ||
nlist( | ||
"name","hostname", | ||
dict( | ||
"name", "hostname", | ||
"comment", "some interesting text", | ||
"frequency", "*/2 * * * *", | ||
"command", "/bin/hostname"), | ||
"env", nlist("MAILTO", "[email protected]"), | ||
nlist( | ||
"env", dict("MAILTO", "[email protected]"), | ||
dict( | ||
"name", "date", | ||
"comment", "runs the date sometime within a 3 hour period", | ||
"timing", nlist( | ||
"timing", dict( | ||
"minute", "0", | ||
"hour", "1", | ||
"smear", 180), | ||
|
@@ -158,9 +61,9 @@ On Solaris three extra entries will be added to the root crontab. | |
|
||
### Solaris | ||
|
||
> Editing the `NCM-CRON BEGIN:` and/or the `NCM-CRON END:` tag within a crontab will | ||
> cause unpredictable behaviour. Possible behavours are duplicate entries or | ||
> entries being removed altogether. | ||
> | ||
> Editing BETWEEN the tags will cause the edits to be overwritten the next time | ||
> ncm-cron runs. | ||
Editing the `NCM-CRON BEGIN:` and/or the `NCM-CRON END:` tag within a crontab will | ||
cause unpredictable behaviour. Possible behavours are duplicate entries or | ||
entries being removed altogether. | ||
|
||
Editing BETWEEN the tags will cause the edits to be overwritten the next time | ||
ncm-cron runs. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.