There is an extra space character on the line just before exec making the parameter not read as -exec and thus messing up the syntax.
Btw. The command looks a bit ruthless and may not behave as you expect. You have no -type f parameter so this could delete directory trees. I've never had any success with using -atime because my backup software changes that timestamp, and prefer to use -mtime instead.
I have never had reason to issue rm -rf in a script. It is particularly dangerous in timestamp-based processing when the timestamp on a top-level directory is older than the timestamp of the child directories.
For example I have just looked at a mature system where the timestamp on /usr is six years ago.