<commit_before># Use this file to easily define all of your cron jobs.
#
# It's helpful, but not entirely necessary to understand cron before proceeding.
# http://en.wikipedia.org/wiki/Cron

# Example:
#
# set :output, "/path/to/my/cron_log.log"
#
# every 2.hours do
#   command "/usr/bin/some_great_command"
#   runner "MyModel.some_method"
#   rake "some:great:rake:task"
# end
#
# every 4.days do
#   runner "AnotherModel.prune_old_records"
# end

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

every 5.minutes do
  runner 'MailboxReader.process_all_mailboxes'
  env :MAILTO, '<EMAIL>'
end

# This pulls in application from 5 days ago to 12 days ago (i.e. a weeks worth)
# They will be sorted with the oldest first.
# It looks like some Local Authorities (LAs) take a week or more to put the applications on-line.
# There is plenty of redudancy in this system but it balances getting up-to-date
# applications against missing applications from slow LAs.
# It will update the application if it already exists.
# PlanIt limit the results to 500.
#
# To get the past 6 months run this
# (1..180).step(15).each {|n_day| PlanningApplicationWorker.new(n_day.days.ago.to_date).process! }
every 1.day, at: '1:02 am' do
  runner "PlanningApplicationWorker.new.process!"
  env :MAILTO, '<EMAIL>'
end

every 1.day, at: '2:02 am' do
  runner "PlanningApplication.remove_old"
  env :MAILTO, '<EMAIL>'
end

every 1.day, at: '6:55 am' do
  runner "Issue.email_upcomming_deadlines!"
  env :MAILTO, '<EMAIL>'
end

every 1.day, at: '7:05 am' do
  runner "DeadlineMessage.email_upcomming_deadlines!"
  env :MAILTO, '<EMAIL>'
end

every 1.day, at: '6:50 am' do
  runner "User.email_digests!"
  env :MAILTO, '<EMAIL>'<commit_msg>Run rails directly, fix path issue<commit_after>job_type :runner,  "cd :path && bundle exec rails runner -e :environment ':task' :output"

# Use this file to easily define all of your cron jobs.
#
# It's helpful, but not entirely necessary to understand cron before proceeding.
# http://en.wikipedia.org/wiki/Cron

# Example:
#
# set :output, "/path/to/my/cron_log.log"
#
# every 2.hours do
#   command "/usr/bin/some_great_command"
#   runner "MyModel.some_method"
#   rake "some:great:rake:task"
# end
#
# every 4.days do
#   runner "AnotherModel.prune_old_records"
# end

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

every 5.minutes do
  runner 'MailboxReader.process_all_mailboxes'
  env :MAILTO, '<EMAIL>'
end

# This pulls in application from 5 days ago to 12 days ago (i.e. a weeks worth)
# They will be sorted with the oldest first.
# It looks like some Local Authorities (LAs) take a week or more to put the applications on-line.
# There is plenty of redudancy in this system but it balances getting up-to-date
# applications against missing applications from slow LAs.
# It will update the application if it already exists.
# PlanIt limit the results to 500.
#
# To get the past 6 months run this
# (1..180).step(15).each {|n_day| PlanningApplicationWorker.new(n_day.days.ago.to_date).process! }

every 1.day, at: '1:02 am' do
  runner "PlanningApplicationWorker.new.process!"
  env :MAILTO, '<EMAIL>'
end

every 1.day, at: '2:02 am' do
  runner "PlanningApplication.remove_old"
  env :MAILTO, '<EMAIL>'
end

every 1.day, at: '6:55 am' do
  runner "Issue.email_upcomming_deadlines!"
  env :MAILTO, '<EMAIL>'
end

every 1.day, at: '7:05 am' do
  runner "DeadlineMessage.email_upcomming_deadlines!"
  env :MAILTO, '<EMAIL>'
end

every 1.day, at: '6:50 am' do
  runner "User.email_digests!"
  env :MAILTO, '<EMAIL>'
{'fraction_non_alphanumeric': 0.11761379700310998, 'fraction_numerical': 0.020356234096692113, 'mean_word_length': 4.241481481481482, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2050984', 'n_tokens_mistral': 1283, 'n_tokens_neox': 1221, 'n_words': 419}