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? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
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 -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.