I can't figure out how to set a simple date variable in crontab. Setting static variables works fine, for example:
But all of the following (some of which work fine in BASH) don't work in crontab:
Code:
MYDATE=date
MYDATE=`date`
MYDATE=$(date)
They cause MYDATE to contain the literal text that appears on the RHS, including backticks, dollar-sign and parentheses, etc.
So it appears to be a problem with command execution or redirection, but I haven't been able to figure it out. It's not a PATH issue though; using "/bin/date" in place of just "date" makes no difference.
Any ideas?
Thanks,
--
Anthony DiSante
Encodable Industries
http://encodable.com/
Bookmarks