mirror of
https://github.com/edcommonwealth/sqm-dashboards.git
synced 2026-03-08 23:18:18 -07:00
don't survey on weekends
This commit is contained in:
parent
aee434a148
commit
7dc603b7ee
2 changed files with 23 additions and 4 deletions
|
|
@ -1,10 +1,12 @@
|
|||
namespace :survey do
|
||||
|
||||
desc 'Text all Recipients ready for an Attempt'
|
||||
desc 'Text all Recipients ready for an Attempt (only on weekdays)'
|
||||
task :attempt_questions => :environment do
|
||||
Schedule.active.each do |schedule|
|
||||
schedule.recipient_schedules.ready.each do |recipient_schedule|
|
||||
recipient_schedule.attempt_question
|
||||
if Date.today.on_weekday?
|
||||
Schedule.active.each do |schedule|
|
||||
schedule.recipient_schedules.ready.each do |recipient_schedule|
|
||||
recipient_schedule.attempt_question
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue