In the commandline I am able to do
cp htlog.out test.$(date '+%m%d%Y')
but when I try to crontab it like this:
37 17 * * 1-5 cd the/dir && cp htlog.out test.$(date "+%m%d%Y")
It fails with the following message from the CRON DAEMON:
/bin/sh: -c: line 0: unexpected EOF while looking for matching `"'
/bin/sh: -c: line 1: syntax error: unexpected end of file
And I do have endlines after the command. What is wrong with that crontab entry?
%incrontabhave a special meaning, it should be backslashed, so:From
man 5 crontab: