diff --git a/clock.rb b/clock.rb index 8259074ebf0..7df239e4c3a 100644 --- a/clock.rb +++ b/clock.rb @@ -47,12 +47,6 @@ module Clockwork end end - every(5.minutes, 'schedule:api_keys_track_usage') do - Clock::ApiKeys::TrackUsageJob - .set(sentry: {"slug" => 'lago_api_keys_track_usage', "cron" => '*/5 * * * *'}) - .perform_later - end - every(1.hour, 'schedule:terminate_ended_subscriptions', at: '*:05') do Clock::TerminateEndedSubscriptionsJob .set(sentry: {"slug" => 'lago_terminate_ended_subscriptions', "cron" => '5 */1 * * *'}) @@ -64,6 +58,13 @@ module Clockwork .set(sentry: {"slug" => 'lago_bill_customers', "cron" => '10 */1 * * *'}) .perform_later end + + every(1.hour, 'schedule:api_keys_track_usage', at: '*:15') do + Clock::ApiKeys::TrackUsageJob + .set(sentry: {"slug" => 'lago_api_keys_track_usage', "cron" => '15 */1 * * *'}) + .perform_later + end + every(1.hour, 'schedule:retry_generating_subscription_invoices', at: '*:30') do Clock::RetryGeneratingSubscriptionInvoicesJob .set(sentry: {"slug" => 'lago_retry_invoices', "cron" => '30 */1 * * *'})