These can be set on a per CronTab basis.
SHELL = /bin/sh
PATH = .:/bin:/usr/bin
Test = 'This is a test'
Hello = "World"
Values = With Spaces
with special meanings.
Defaults to data in the users `passwd` entry
If set, will mail the output of Cron to the user with the specified login name
Useful if you decide to use BINMAIL in `cron.h` as it doesn't know anything about aliasing
Defaults to `/bin/sh`
Read from the users `passwd` entry and cannot be changed
Defaults to data in the users `passwd` entry
Contains the systems paths
Can be set, but ignored other than for the command it runs
can be specified with their first 3
letters in whatever case you prefer.
can be specified with their first 3
letters in whatever case you prefer.
Unlike standard Cron, ranges & lists can be mixed.
1,3-5
Ranges can specify a value to step width.
10-16/2 ≍ 10,12,14,16
10-16/3 ≍ 10,13,16
The day can be specified with both 0
and 7
which BSD and ATT apparently disagree about.
Every user has their own CronTab config,
as it is also done in System V's Cron flavor.
In this version of BSD, only the root
user could have a CronTab config.
-
The CronTab format was made incompatible.
-
Non-root UIDs could run the command.
-
Only root could edit the CronTab file.
The crontab
command is loosely compatible with
System V, but has been extended with more options.
Running the command without arguments
shows a summary on how to use of the it.
-
Must be on a line by themselves
-
Can have leading whitespace
-
#
starts the comment
If the crontab
command makes any changes,
the Cron daemon will reload all tables before the
next iteration automatically.
-
May require you have to kill and restart the daemon.
-
May unnecessarily read & parse the config continuously.
The CronTab files cannot be read nor modified other
than with the crontab
/ cron
commands, this is
to allow for automatic reloading.
This shouldn't pose a problem however, as crontab
allows you to adjust everything in your own CronTab.
With root you can of course access anyone's CronTab.
Any output generated by commands to stdout
and
stderr
will be mailed to the owner of the CronTab.
Alternatively the MAILTO
variable is used.
⤷ Check the Environment Variable section.
The email messages header will include:
-
The command that was run by Cron
-
The list of passed environment variables of
which the following will always be present:SHELL
HOME
USER
LOGNAME
LogName is only passed on System V
The situation is odd.
* * 1,15 * Sun
will run on:
1st | 15th | Sundays
* * * * Sun
will only run on:
Sundays
* * 1,15 * *
will only run on:
1st | 15th
This is why we keep e -> dow_star
& e -> dom_star
I didn't think up this behavior, it's how Cron
has always worked but the documentation
hasn't been very clear.
I have been told that some AT&T Crons do not
act this way and do the more reasonable thing,
which is - in my honest opinion - to or
the
various field - matches together.
In that sense this Cron isn't completely
similar to some of the AT&T Crons .