If you feel like discussing this further in a medium better suited for discussion, you'll find me in #ubuntu and #bash, among other channels, on irc.Although cron requires that each entry in a crontab end in a newline character, neither the crontab command nor the cron daemon will detect this error. 4th Berkeley Distribution 29 December 1993 CRONTAB(1) on Ubuntu 10.10 says "cron requires that each entry in a crontab end in a newline character.
Hence playing it save and including a blank [email protected] Suh, according to man page "cron requires that each entry in a crontab end in a newline character.
If the last entry in a crontab is missing the newline, cron will consider the crontab (at least partially) broken and refuse to install it." This behavior will be invoked when editing then saving the crontab using the If neither the --lsbsysinit option nor the --regex option is given then the names must consist entirely of upper and lower case letters, dig‐ its, underscores, and hyphens.
If the --lsbsysinit option is given, then the names must not end in .dpkg-old or .dpkg-dist or .dpkg-new or .dpkg-tmp, and must belong to one or more of the following namespaces: the LANANA-assigned namespace (^[a-z0-9]+$); the LSB hierarchical and reserved namespaces (^_?
([a-z0-9_.]+-)+[a-z0-9]+$); and the Debian cron script namespace (^[a-z A-Z0-9_-]+$).
If this is a feature, it's not a nice one :( A lot of people use dot in file name (is the most common one).
If you want to a script to stop executing, the most logical method will be to remove it from "cron.d" directory.
This is what has been causing my Cron job to fail for the last week. you do NOT need to define the PATH - using absolute paths is the best practice here.
Finally figured out that my Date didn't have an escape character (backslash for any other folks looking for what the escape character is). "because an executable may be elsewhere on some other computer" doesn't trump "I want it to run exactly this program and not some other one someone put in the path in front of my original program" Permissions problems are quite common, I'm afraid.
Some prefer to just use absolute paths to all the commands instead. Consider what happens if you want to run your script on a different system, and on that system, the command is in @pbr A sysadmin could unwittingly delete the root filesystem.