Sample Header Ad - 728x90

what's wrong with my cron command?

0 votes
1 answer
97 views
In my cron file (Mac, El Capitan) I have a line that simply updates a file name with a date every day.
0 1 * * * mv /Users/me/0backup* /Users/me/0backup_$(date +"\%m-\%d-\%y")
This allows me to quickly check that backups have been done. This seems to work fine on other machines, but on this particular machine it works (the file name DOES get updated), but every day when it is executed I get mailed errors:
/bin/sh: -c: line 0: unexpected EOF while looking for matching `"'
/bin/sh: -c: line 1: syntax error: unexpected end of file
What's going on? Why am I getting these errors?
Asked by user618 (167 rep)
Mar 29, 2024, 01:05 PM
Last activity: Aug 28, 2024, 04:05 AM