I can't debug this because you haven't said what
levels2weeklyret() does. However, I can offer a tip:
use traceback() straight after the error to see exactly
where it goes wrong. If still baffled, use debug() [takes
a bit of learning].
To return multiple values, return a list (see ?return) or
Issue the command:
debug(eat.a.file)
and then run your eat.a.file call. This will step you through
the function showing where it goes wrong.
By the way,
- you don't need semicolons at the end of each line,
- the format you are specifying on chron is the default anyways
so you can leave