> Experientially, there is a 999 character truncation per line on all of my Ubuntu machines, although I have not yet found any related explanatory documentation.
> I've tested on Ubuntu 10.04, 12.04, and 14.04, and the 999 character count is started at the first non-whitespace character past the schedule.
This fantastic. Indeed, this is completely undocumented.
Running `grep -R 1000 .` on `apt-get-source cron` turns up:
./cron-3.0pl1/cron.h:#define MAX_COMMAND 1000 /* max length of internally generated cmd */
Further grepping for MAX_COMMAND gives you this gem:
/* Everything up to the next \n or EOF is part of the command...
* too bad we don't know in advance how long it will be, since we
* need to malloc a string for it... so, we limit it to MAX_COMMAND.
* XXX - should use realloc().
*/
ch = get_string(cmd, MAX_COMMAND, file, "\n");
Until your embedded device running cron, say your pacemaker or "smart" fire alarm, chops off a part from the yearly `0 0 1 1 * very-long-command-to-stop-service; start-service`.
5 comments
[ 4.6 ms ] story [ 26.0 ms ] thread> Experientially, there is a 999 character truncation per line on all of my Ubuntu machines, although I have not yet found any related explanatory documentation.
> I've tested on Ubuntu 10.04, 12.04, and 14.04, and the 999 character count is started at the first non-whitespace character past the schedule.
Running `grep -R 1000 .` on `apt-get-source cron` turns up:
Further grepping for MAX_COMMAND gives you this gem: XXX - should use realloc().Really?
This should be documented but I don't see the big deal.