Linux crontab find and email results receiving EOF
<p>when I run a command via command line, it works fine, I get the email with the desired results inside of an attached *.txt file. however, when cron runs this same command, I receive an EOF error.</p>

<p>Can anyone point out what might be causing this error?</p>

<p>I am running CPanel on CentOS with Cloudlinux 6.6</p>

<p>Here is the email I receive from cron saying it errored;</p>

<pre><code>Subject: Cron &lt;root@whm&gt; find /home/accountname/public_html -type f -mtime -7 2&gt; `date +'

/bin/sh: -c: line 0: unexpected EOF while looking for matching ``'
/bin/sh: -c: line 1: syntax error: unexpected end of file
</code></pre>

<p>Here is my command;</p>

<pre><code>01 * * * * find /home/accountname/public_html -type f -mtime -7 2&gt; `date +'%m-%d-%Y'`-accountname-filescan.txt | uuencode `date +'%m-%d-%Y'`-accountname-filescan.txt | mail -s "`date +'%m-%d-%Y'`-accountname File Scan Report" root
</code></pre>

<p>I'd appreciate any constructive input on what I am doing wrong.</p>

<p>I followed this thread to develop my command;
<a href="https://stackoverflow.com/questions/5190215/linux-cron-job-to-email-output-from-a-command">Linux cron job to email output from a command</a></p>