script/runner and cron, funny behavior

Ryan Mohr wrote:

I couldn't figure out why my cronjobs weren't executing correctly. They
would run, but the code would not be executed. Here's what the problem
was:

This was the cronjob that was not working correctly:
* * * * * /path/to/app/script/runner -e production "Code.to_execute"

And this is what I had to do to get it to work:
* * * * * cd /path/to/app/; ./script/runner -e production
"Code.to_execute"

Why does changing into the app's directory before executing runner make
a difference? Anyone else run into this before?

Hi Ryan Mohr
Thx very much for your answer. I am also facing the same situation
before reading your post. Now me 2 execute my cron file successfully.

Thank you