Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions scheduler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
require "clockwork"

module Clockwork
every(1.week, "Send Due Emails", at: "Monday 10:30", tz: Rails.application.config.time_zone) do
every(1.day, "Send Due Emails", at: "10:30", tz: Rails.application.config.time_zone, if: lambda { |t| t.monday? }) do
SendDueEmailsJob.perform_now
end

every(1.week, "Send Overdue Emails", at: "Monday 10:25", tz: Rails.application.config.time_zone) do
every(1.day, "Send Overdue Emails", at: "10:25", tz: Rails.application.config.time_zone, if: lambda { |t| t.monday? }) do
SendOverdueEmailsJob.perform_now
end

every(1.week, "Send Category Overdue Emails", at: "Monday 10:20", tz: Rails.application.config.time_zone) do
every(1.day, "Send Category Overdue Emails", at: "10:20", tz: Rails.application.config.time_zone, if: lambda { |t| t.monday? }) do
SendCategoryOverdueEmailsJob.perform_now
end

Expand Down
Loading