Sha256: 570e8cca9d467b42cdf90b9fab0fb565e4606a2af62a375c13bb52d3e54d381e

Contents?: true

Size: 491 Bytes

Versions: 7

Compression:

Stored size: 491 Bytes

Contents

class <%= class_name %>Task < Scheduler::SchedulerTask
  environments :all
  # environments :staging, :production
  
  every '10s'
  # other examples:
  # every '24h', :first_at => Chronic.parse('next midnight')
  # cron '* 4 * * *'  # cron style
  # in '30s'          # run once, 30 seconds from scheduler start/restart
  
  
  def run
    # Your code here, eg: 
    # User.send_due_invoices!
    
    # use log() for writing to scheduler daemon log
    log("I've sent invoices!")
  end
end

Version data entries

7 entries across 7 versions & 3 rubygems

Version Path
scheduler_daemon-1.1.6 lib/scheduler_daemon/rails/generators/scheduler_task/templates/scheduled_tasks/example_task.rb
scheduler_daemon-1.1.5 lib/scheduler_daemon/rails/generators/scheduler_task/templates/scheduled_tasks/example_task.rb
scheduler_daemon_3lancers-1.1.5 lib/scheduler_daemon/rails/generators/scheduler_task/templates/scheduled_tasks/example_task.rb
scheduler_daemon-1.1.3 lib/scheduler_daemon/rails/generators/scheduler_task/templates/scheduled_tasks/example_task.rb
scheduler_daemon_robertcigan-1.1.3 lib/scheduler_daemon/rails/generators/scheduler_task/templates/scheduled_tasks/example_task.rb
scheduler_daemon-1.1.2 lib/scheduler_daemon/rails/generators/scheduler_task/templates/scheduled_tasks/example_task.rb
scheduler_daemon-1.1.1 lib/scheduler_daemon/rails/generators/scheduler_task/templates/scheduled_tasks/example_task.rb