How can I run the hero planner weekly?
Is this possible, from what I see, I can only schedule every hour, every 10 minutes, or daily tasks without the weekly option.
If not, what other additions to Heroku can allow me to complete tasks (i.e. cron work) on a weekly chassis in production.
Thank!
Update 2:
require 'date'
task :weeklydelete do
if Date.today.wday.zero?
runner "Event.clear_expired"
runner "Activity.clear_expired"
end
end
Update 2.5:
$heroku run bundle exec rake weeklydelete -a friendiosenew
Running `bundle exec rake weeklydelete` attached to terminal... up, run.6194
rake aborted!
undefined local variable or method `path' for main:Object
/app/lib/tasks/weeklydelete.rake:2:in `block in <top (required)>'
Tasks: TOP => weeklydelete
(See full trace by running task with --trace)
source
share