Skip to content

Commit

Permalink
add rufus scheduler
Browse files Browse the repository at this point in the history
  • Loading branch information
jmarsh24 committed Feb 6, 2024
1 parent b5adbca commit 79cc626
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,7 @@ DEPENDENCIES
rubocop-rails
rubocop-rake
rubocop-rspec
rufus-scheduler (~> 3.9)
rufus-scheduler
sassc-rails
sentry-rails
sentry-ruby
Expand Down
28 changes: 28 additions & 0 deletions config/initializers/scheduler.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
require "rufus-scheduler"

scheduler = Rufus::Scheduler.new

# Harvest Import Job
scheduler.every "30m" do
HarvestImportJob.perform_later
end

# Github Import Job
scheduler.every "30m" do
GithubImportJob.perform_later
end

# Slack Notification Job
scheduler.cron "0 8 * * * Europe/Berlin" do
SlackNotificationJob.perform_later
end

# Slack Congratulation Job
scheduler.cron "0 9 * * * Europe/Berlin" do
SlackCongratulationJob.perform_later
end

# Slack Set Status Job
scheduler.cron "0 0 * * * Europe/Berlin" do
SlackSetStatusJob.perform_later
end

0 comments on commit 79cc626

Please sign in to comment.