Skip to content
Snippets Groups Projects
Select Git revision
  • issue/70-hotfix-error-collection-resource-deleted
  • develop default protected
  • issue-68/streak-high_streak-last_action_at
  • issue/65-govbr
  • issue/54-curator-queue
  • issue/58-testar-s3
  • master protected
  • pre-submission
  • pre-languages
  • video-cache
  • tag-clustering-task
  • pre-api
  • orientdb
13 results

schedule.rb

Blame
  • Forked from PortalMEC / portalmec
    4 commits behind, 72 commits ahead of the upstream repository.
    schedule.rb 1.68 KiB
    # Copyright (C) 2015 Centro de Computacao Cientifica e Software Livre
    # Departamento de Informatica - Universidade Federal do Parana
    #
    # This file is part of portalmec.
    #
    # portalmec is free software: you can redistribute it and/or modify
    # it under the terms of the GNU Affero General Public License as published by
    # the Free Software Foundation, either version 3 of the License, or
    # (at your option) any later version.
    #
    # portalmec is distributed in the hope that it will be useful,
    # but WITHOUT ANY WARRANTY; without even the implied warranty of
    # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    # GNU Affero General Public License for more details.
    #
    # You should have received a copy of the GNU Affero General Public License
    # along with portalmec.  If not, see <http://www.gnu.org/licenses/>.
    
    # 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
    
    # update score of learning objects
    set :output, "log/cron.log"
    
    every 1.days do
      rake 'score:calculate_sync'
    end
    
    #Reassign submitted LO that has expired
    every :sunday, at: '3am' do
      rake 'submission:reassign'
    end
    
    every :sunday, at: '21:00am' do
      rake 'delete_empty_drafts:drafts_cleanup'
    end
    
    every 5.days do
      rake 'delete_production_log:delete_log'
    end
    
    every 1.days, at: '12am' do
      rake 'user:restart_streaks'
    end