If I put the following in crontab -e:
crontab -e
* * * * * date +\"%Y-%m-%d\" > /home/apps/temp/env.txt
there is no env.txt
env.txt
You need to escape each one of the %:
%
* * * * * date +"\%Y-\%m-\%d" > /home/apps/temp/env.txt
Or even better, remove the quotes and leave like this:
* * * * * date +\%Y-\%m-\%d > /home/apps/temp/env.txt