```ruby
###
# Application's tasks.
# These task are required by the application.
# They are used on Heroku Scheduler.
###

desc 'This task is called by the Heroku cron add-on'
task :cron => :environment do
  Project.to_finish.each do |project|
    CampaignFinisherWorker.perform_async(project.id)
  end
end
```

Create rake task to import users/projects/rewards
user
```ruby
###
# Application's tasks.
# These task are required by the application.
# They are used on Heroku Scheduler.
###

desc 'This task is called by the Heroku cron add-on'
task :cron => :environment do
  Project.to_finish.each do |project|
    CampaignFinisherWorker.perform_async(project.id)
  end
end

desc 'Import data from YAML file for new users/projects/rewards'
task :import_projects, [:file_url] => :environment do |t, args|
  require 'open-uri'
  file_url  = args.file_url
  file      = open(file_url).read
  raw_data  = Psych.load(file)

  raw_data.each do |element|
    user = User.new(element[:issuer])
    user.autogenerated = true
    user.save(validate: false)

    parse_date = ->(string) { string.present? and Date.strptime(string, '%m/%d/%Y') }

    element[:issue][:sale_date] = parse_date.call(element[:issue][:sale_date])
    element[:issue][:rewards_attributes].each do |reward_attributes|
      reward_attributes[:happens_at] = parse_date.call(reward_attributes[:happens_at])
    end
    if element[:issue][:name].present?
      project = Project.new(element[:issue])
      project.user_id   = user.id
      project.state     = :draft
      project.goal    ||= 0
      project.generate_permalink!
      project.save(validate: false)
    end
  end
end
```
assistant