Sha256: 51120610f1ba1cab6cb58313bd16ebabf4d69414e2b97e255a966016f84d2f6c

Contents?: true

Size: 1 KB

Versions: 12

Compression:

Stored size: 1 KB

Contents

# frozen_string_literal: true

######## check

# Relaunch all tasks
relaunch_all_tasks

# Example: Schedule a task to run at a specific date and time
schedule_task('specific_time_task', 2024, 11, 12, 15, 12, 30) do
  puts "Task running at the specific date and time"
end

# Example: Schedule a task to run every minute
schedule_task('every_minute_task', 2024, 05, 12, 15, 12, 3, recurrence: :minutely) do
  puts "Task running every minute"
end

# Example: Schedule a task to run every Tuesday at the same time
schedule_task('weekly_tuesday_task', 2024, 11, 12, 15, 12, 30, recurrence: { weekly: 2 }) do
  puts "Task running every Tuesday at the same time"
end

# Example: Schedule a task to run every second Wednesday of the month at the same time
schedule_task('second_wednesday_task', 2024, 11, 12, 15, 12, 30, recurrence: { monthly: { week: 2, wday: 3 } }) do
  puts "Task running every second Wednesday of the month at the same time"
end

# Stop a task
# wait 133 do
#   puts 'stop'
#   stop_task('every_minute_task')
# end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
atome-0.5.7.6.0 vendor/assets/application/examples/scheduler.rb
atome-0.5.7.5.9 vendor/assets/application/examples/scheduler.rb
atome-0.5.7.5.4 vendor/assets/application/examples/scheduler.rb
atome-0.5.7.5.3 vendor/assets/application/examples/scheduler.rb
atome-0.5.7.5.1 vendor/assets/application/examples/scheduler.rb
atome-0.5.7.4.8 vendor/assets/application/examples/scheduler.rb
atome-0.5.7.4.7 vendor/assets/application/examples/scheduler.rb
atome-0.5.7.4.6 vendor/assets/application/examples/scheduler.rb
atome-0.5.7.4.3 vendor/assets/application/examples/scheduler.rb
atome-0.5.7.4.2 vendor/assets/application/examples/scheduler.rb
atome-0.5.7.3.9 vendor/assets/application/examples/scheduler.rb
atome-0.5.7.3.6 vendor/assets/application/examples/scheduler.rb