Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Given a line in my crontab -e:

02  12 * * *   * rsync -r -t -v /Users/pnathan/ /Volumes/archive_hdd/

I get an email from cron which looks like this:

/bin/sh: #.emacs#: command not found

#.emacs# is the first file in the rsync listing when I run the command from the command line.

When I grep ps -Af for rsync, it turns out not to have spawned. I'm gathering that somehow, bash is trying to exec the output, but doesn't make sense, at least not from my reading of the man pages.

share|improve this question
This seems a bit odd to me for another reason: In sh, # is treated as a comment delimiter, so it shouldn't be trying to run anything with a # before it, because it should be a comment. – Wuffers Mar 8 '11 at 2:21
up vote 2 down vote accepted

You've got one too many time spec fields. It should be:

02 12 * * * rsync -r -t -v /Users/pnathan/ /Volumes/archive_hdd/
share|improve this answer
I'm going to go have a durp over in the corner now. – Paul Nathan Mar 8 '11 at 2:30

You must log in to answer this question.

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