Hello, The following cron job is failing to run: 00 16 * * * root ruby /home/nathan/rails/notifications/script/runner -e production Notifier.deliver_summary My understanding from the Rails Wiki is that this should do it. Can anyone shed some light on what I may have setup wrong? Thanks! Nathan Mealey Operations Director Northeast Region Pilgrim IT, LLC NORTHEAST OFFICE 1 Short Street Northampton, MA 01060 TEL 413.517.5010 x201 FAX 413.587.0572 NOTICE: This email and any attachments are intended only for the addressee and may contain information that is confidential and/or legally privileged. If you are not the intended recipient or have received this email in error, please notify the sender by return email or by calling 866-434-4976. You should then delete the message and any attachments or copies. If you are not the intended recipient, you are prohibited from retaining, distributing, disclosing or using any information contained herein. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060508/e96dd27e/attachment-0001.html
> The following cron job is failing to run: > > 00 16 * * * root ruby /home/nathan/rails/notifications/script/runner -e > production Notifier.deliver_summary > > My understanding from the Rails Wiki is that this should do it. > > Can anyone shed some light on what I may have setup wrong?Is ruby in the PATH for cron? -philip
/usr/bin (where ruby is found) is in the path stipulated in crontab. I should also say that I can run same command that is in the crontab from the command line, with no problem (whether as root or myself): ruby /home/nathan/rails/notifications/script/runner -eproduction Notifier.deliver_summary Thanks! -----Original Message----- From: rails-bounces@lists.rubyonrails.org [mailto:rails-bounces@lists.rubyonrails.org] On Behalf Of Philip Hallstrom Sent: Monday, May 08, 2006 4:10 PM To: rails@lists.rubyonrails.org Subject: Re: [Rails] Cron Scheduling Problem> The following cron job is failing to run: > > 00 16 * * * root ruby /home/nathan/rails/notifications/script/runner-e> production Notifier.deliver_summary > > My understanding from the Rails Wiki is that this should do it. > > Can anyone shed some light on what I may have setup wrong?Is ruby in the PATH for cron? -philip _______________________________________________ Rails mailing list Rails@lists.rubyonrails.org http://lists.rubyonrails.org/mailman/listinfo/rails
I made once the experience that a command with arguments did not work in my crontab, so I set a shellscript containing the command and in the crontab just called the shellscript and that worked ... On 5/8/06, Nathan Mealey <nmealey@pilgrimit.com> wrote:> > /usr/bin (where ruby is found) is in the path stipulated in crontab. > > I should also say that I can run same command that is in the crontab > from the command line, with no problem (whether as root or myself): > ruby /home/nathan/rails/notifications/script/runner -eproduction > Notifier.deliver_summary > > Thanks! > > > -----Original Message----- > From: rails-bounces@lists.rubyonrails.org > [mailto:rails-bounces@lists.rubyonrails.org] On Behalf Of Philip > Hallstrom > Sent: Monday, May 08, 2006 4:10 PM > To: rails@lists.rubyonrails.org > Subject: Re: [Rails] Cron Scheduling Problem > > > The following cron job is failing to run: > > > > 00 16 * * * root ruby /home/nathan/rails/notifications/script/runner > -e > > production Notifier.deliver_summary > > > > My understanding from the Rails Wiki is that this should do it. > > > > Can anyone shed some light on what I may have setup wrong? > > Is ruby in the PATH for cron? > > -philip > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-- Roberto Saccon -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060508/4bae6519/attachment.html
Nathan Mealey wrote:> The following cron job is failing to run:Failing to run as in no output, no mail, no anything? Is cron running on your system? Cron sends mail to the user when there is any output. Your first goal should be to make sure that you see the output, then you will know why it is failing.> 00 16 * * * root ruby /home/nathan/rails/notifications/script/runner ?e > production Notifier.deliver_summaryroot isn''t a command on any *nix I know, so unless that is a typo, that is one problem with this line. I''d also be deeply suspicious of the bare ruby without a path. Doesn''t script/runner have a correct path to ruby in the #! line? -- Ray
>> 00 16 * * * root ruby /home/nathan/rails/notifications/script/runner ?e >> production Notifier.deliver_summary > > root isn''t a command on any *nix I know, so unless that is a typo, that is > one problem with this line.If it''s /etc/crontab (the system crontab) there is a field for the user to run the command as... Of course if the above is in the user''s personal crontab entry then that''s why it''s failing...