Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9150371
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T11:36:10+00:00 2026-06-17T11:36:10+00:00

I’m using the whenever gem to have a rails cron job send emails. Everything

  • 0

I’m using the whenever gem to have a rails cron job send emails. Everything seems to work just fine and i have no errors in my cron.log or my production.log file, but i never receive an email. I’ve checked that the email address is correct also.

Any help is appreciated.

The production.log file contains this:

Connecting to database specified by database.yml
  Rendered email_mailer/send_birthday_reminders.html.erb (5.3ms)

Sent mail to tomcaflisch@gmail.com (409ms)

Here’s my whenever gem schedule.rb file

set :output, "#{path}/log/cron.log"

every :hour do
    runner "BirthdayRemindersController.send_birthday_email_reminders"
end

birthday_reminders_controller.rb

class BirthdayRemindersController < ApplicationController

    # cron job that sends birthday reminders
    def self.send_birthday_email_reminders 
        users = User.all

        email_addresses = []

        users.each_with_index do |user, i|
            if user.user_details.birthday_reminders == true
                email_addresses[i] = get_primary_email(user)
            end
        end
        p "email_addresses to send to:"
        p email_addresses

        users.each do |user|
            p "this user is"
            p user.user_details.full_name
            if user.user_details.birthday.try(:strftime, "%m") == Date.today.strftime("%m") && user.user_details.birthday.try(:strftime, "%d") == Date.today.strftime("%d")
                p "reminder sent"
                EmailMailer.send_birthday_reminders(user, email_addresses).deliver
            end
        end
    end
end

email_mailer.rb snippet

class EmailMailer < ActionMailer::Base
  include ApplicationHelper
  default :from => "\"FamNFo\" <no-reply@mysite.com>"

  def send_birthday_reminders(birthday_person, email_addresses)
    p "we in send_birthday_reminders mailer"
    p email_addresses
    @birthday_person = birthday_person
    mail(:subject => "Birthday Reminder For The Caflisch Family", :to => email_addresses, :reply_to => email_addresses)
  end
end

capistrano’s deploy.rb contains this

# needed for the 'whenever' gem
set(:whenever_command) { "RAILS_ENV=#{rails_env} bundle exec whenever"}
require "whenever/capistrano"
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T11:36:11+00:00Added an answer on June 17, 2026 at 11:36 am

    Check your spam folder. To make sure emails don’t end up there, add an “Unsubscribe” link in each email.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have just tried to save a simple *.rtf file with some websites and
I am using the SimpleRSS gem to parse a WordPress RSS feed. The only
We're building an app, our first using Rails 3, and we're having to build
I have thousands of HTML files to process using Groovy/Java and I need to
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
That's pretty much it. I'm using Nokogiri to scrape a web page what has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a jquery bug and I've been looking for hours now, I can't

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.