Skip to content

Commit

Permalink
Added Sample Cron Job to test Whenever Gem
Browse files Browse the repository at this point in the history
  • Loading branch information
namangupta01 committed May 16, 2018
1 parent 5f649b8 commit 2081c92
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions config/schedule.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,12 @@
# end

# Learn more: http://github.com/javan/whenever

# Cron Job log file
set :output, "#{Dir.pwd}/public/cron_log.log"

# To simply print date into the log file for checking if cron job is working properly
every 1.minutes do
puts Dir.pwd
command "date -u" #This will print utc time every 1 min in log/cron_log.log file
end
Empty file added public/cron_log.log
Empty file.

0 comments on commit 2081c92

Please sign in to comment.