crontab file copy file and add date

I can telnet into my sever and issue the following command.

cp usr/local/etc/httpd/htdocs/register/cdata.txt usr/local/etc/httpd/htdocs/`date +'%m%d%y'`cdata

The file cdate.txt will be copied correctly adding the date to the file and leaving off the  extension.

When I put the same command in the cronfile, the file is copied
but does not have the date added to the name of the file.

How can  I solve this problem?
piratesAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

ozoCommented:
try giving the full path to the date command
0
piratesAuthor Commented:
I tried adding the full path to the date command, but it did not
solve the problem.
0
ozoCommented:
What's in your crontab?
Can you try
* * * * * cp /usr/local/etc/httpd/htdocs/register/cdata.txt /usr/local/etc/httpd/htdocs/`date +\%m\%d\%y`cdata
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
piratesAuthor Commented:
Thanks,  that solved the problem.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Unix OS

From novice to tech pro — start learning today.