Forum: Ruby on Rails Cron Scheduling Problem

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
0b8601544389bf0603f63bfe5afae865?d=identicon&s=25 Nathan Mealey (Guest)
on 2006-05-08 21:55
(Received via mailing list)
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.
2f9a03aa0fcfe945229cb6126eda2cb2?d=identicon&s=25 Philip Hallstrom (Guest)
on 2006-05-08 22:08
(Received via mailing list)
> 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
E28c35323f624b8b9ed8712e25105454?d=identicon&s=25 Ray Baxter (Guest)
on 2006-05-08 23:08
(Received via mailing list)
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_summary

root 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
2f9a03aa0fcfe945229cb6126eda2cb2?d=identicon&s=25 Philip Hallstrom (Guest)
on 2006-05-08 23:20
(Received via mailing list)
>> 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...
This topic is locked and can not be replied to.