0

I think this is a "Full Disk Access" problem.

I have added "Terminal" and "cron" to Full Disk Access.

The problem is when I am trying to use the command below, it works from Terminal but not with cron.

cp -n LastSession.plist  /XYZ/LastSession.plist.$(date +%F).txt

It breaks in cron when I add $(date +%F). I tried researching this but no luck.

How can I get this command to run in cron using Mojave?

1 Answer 1

2

Figured it out.

You have to escape the % in cron, so should read like this:

* * * * * cp -n LastSession.plist  /XYZ/LastSession.plist.$(date +\%F).txt

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .