Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

adding logs output for cron

  • Loading branch information...
commit 861be6bb371f2d45d8186df97eb6ffc049b76550 1 parent 3f3e8e3
@mcansky authored
Showing with 3 additions and 0 deletions.
  1. +3 −0  lib/tasks/cron.rake
View
3  lib/tasks/cron.rake
@@ -1,7 +1,10 @@
task :cron => :environment do
if Stat.last.created_at < (Time.now - 86400)
+ Rails.logger.info("Generating stats for #{Time.now.strftime("%d/%m/%Y")}")
daily_stats = Stat.new
daily_stats.generate
daily_stats.save
+ else
+ Rails.logger.info("Stats for #{Time.now.strftime("%d/%m/%Y")} already exist !")
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.