Forum: Ruby on Rails Sendmail with cron

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.
F0feb4c0d33a8e1da974df1c8a8d5299?d=identicon&s=25 Mikael Björkegren (sveaspade)
on 2009-01-23 10:53
Hi!

I'am using crontab for creating an email list every night
on daily basis. It works perfectly. And use it for other
things also.

But my problem is that i can't get crontab to work for armailer,
i would like to have a crontab for ar_sendmail -o but can not
get this to work.

Any one who have the same problem or even better a solution.

Thanks Svea
2505b282d57c29be797dc35b245adb4c?d=identicon&s=25 Philip Hallstrom (Guest)
on 2009-01-23 23:03
(Received via mailing list)
> I'am using crontab for creating an email list every night
> on daily basis. It works perfectly. And use it for other
> things also.
>
> But my problem is that i can't get crontab to work for armailer,
> i would like to have a crontab for ar_sendmail -o but can not
> get this to work.
>
> Any one who have the same problem or even better a solution.

Can you get ar_sendmail to work from the command line?  If that works,
compare the differences in environment variables b/n your interactive
shell and cron's environment.  Cron is notorious for setting a very
limited path that does NOT include /usr/local/bin.

For example, on my mac I put this at the top of my crontab file:

PATH=/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/
X11/bin:/Library/PostgreSQL8/bin:/usr/local/mysql/bin:/usr/local/lsws/
bin:/usr/local/git/bin:/Users/philip/bin

Is it necessary?  Honestly I don't remember... osx may grab things
from the central location, but I'm in such a habit of doing it I just
always add it.

Good luck!

-philip
F0feb4c0d33a8e1da974df1c8a8d5299?d=identicon&s=25 Mikael Björkegren (sveaspade)
on 2009-02-05 11:22
Thanks, i missed a line in my path so thats why it did not work.
This topic is locked and can not be replied to.