Added link to cron exaplanation site

Added gotcha about line breaks in crontab file
This commit is contained in:
mynamewastaken
2014-01-16 14:07:49 -06:00
parent 02608c250e
commit 27d18870ca

View File

@@ -129,6 +129,9 @@ Knowing this, we can see that this "crontab" means:
At 12:05 every Sunday, every month, regardless of the day of the month, run the
command ``copy-to-partition`` in the ``/home/jdoe/jobs`` directory.
**Caveat**: entries in your crontab must be one long line; if you try to split it up
(with the linebreak ``\`` character for example) you will get an error!
Let's take another example and create a cron job that checks disk space
available every minute, every hour, every day of the month, every month, for
every day of the week, and outputs it to a file named :file:``disk_space.txt``.
@@ -207,6 +210,8 @@ Notes on composing good "cron expressions"
variables that come from your shell initialization files (like ``.bashrc`` or
``.zshrc`` or such). In particular, make sure to specify the full path to your
program if it's not in a commonly-used location like ``/usr/bin``.
- If you have problems with the syntax, or something isn't working properly, there
are websites [#]_ that will explain a particular line from crontab.
Modify a specific user's crontab
--------------------------------
@@ -238,4 +243,6 @@ Footnotes
.. [#] `"Examples" in cron - Wikipedia, a free encyclopedia <http://en.wikipedia.org/wiki/Cron#Examples_2>`_
.. [#] `Crontab to plain english <http://cronchecker.net>`_
.. [#] `Where can I set environment variables that crontab will use?, <http://stackoverflow.com/questions/2229825/where-can-i-set-environment-variables-that-crontab-will-use/10657111#10657111>`_