Merge commit '1cdb9e8501' into rails3-multiple-recurring-tasks

Conflicts:
	Gemfile
	db/schema.rb
This commit is contained in:
Robert Waltemath 2013-03-15 17:59:19 +01:00
commit 981944b869
7 changed files with 75 additions and 3 deletions

View file

@ -51,4 +51,15 @@ namespace :foodsoft do
end
end
end
desc "Create upcoming periodic tasks"
task :create_upcoming_periodic_tasks => :environment do
for tg in PeriodicTaskGroup.all
if tg.has_next_task?
while tg.next_task_date.nil? or tg.next_task_date < Date.today + 30
tg.create_next_task
end
end
end
end
end