I think this is a "Full Disk Access" problem.
I have added "Terminal" and "cron" to Full Disk Access.
Problem is when I am trying to use the below command, it works from Terminal but not with cron.
It works in cron if $(date +%F) is removed. It breaks in cron when I add $(date +%F). I believe I need to add date to Full Disk Access but I am not sure where it is located. I tried researching this but no luck.
How can I get this command to run in cron using Mojave?
I have added "Terminal" and "cron" to Full Disk Access.
Problem is when I am trying to use the below command, it works from Terminal but not with cron.
Code:
cp -n LastSession.plist /XYZ/LastSession.plist.$(date +%F).txt
It works in cron if $(date +%F) is removed. It breaks in cron when I add $(date +%F). I believe I need to add date to Full Disk Access but I am not sure where it is located. I tried researching this but no luck.
How can I get this command to run in cron using Mojave?