Skip to main content
Filter by
Sorted by
Tagged with
0 votes
0 answers
69 views

Laravel page loading issue

I got a loading problem with all my pages in my Laravel app, they all need over 2400 ms to load, the thing is they worked fine and I really don't know where I messed up I ran a login page for the this ...
Tornado's user avatar
  • 21
0 votes
0 answers
166 views

Job being executed twice using Rails, Active Job, Sidekiq, Clockwork, Heroku

Using the stack outlined, my jobs are running twice and I can't figure out why. Everything seems to work as planned when testing locally. I'm using a separate process to run bundle exec clockwork ...
karns's user avatar
  • 5,817
1 vote
1 answer
2k views

tryin to install laravel clockwork but i have an error which is Install of itsgoingd/clockwork failed

In laravel 8 I am trying to install laravel clockwork where i have php version 8.0.3 When I run composer require itsgoingd/clockwork command i got this error Installing itsgoingd/clockwork (v5.0.8):...
Abdullah Al Shahed's user avatar
1 vote
0 answers
812 views

Clockwork for Laravel not working when ran through docker

I have previously used clockwork browser extension for debugging laravel queries. I have never had any issues getting the extension to work as expected. Recently I started using Laravel in a docker ...
Jonathan Hill's user avatar
2 votes
1 answer
401 views

Rails Clockwork events getting called twice locally

When I run my clockwork file, events are registered twice. Am I doing something wrong? CLI I'm running locally to test: clockwork app/lib/clockwork/clock.rb clock.rb: require 'clockwork' require '...
webbyweb's user avatar
  • 435
0 votes
1 answer
200 views

Scheduler works once

The project uses the task scheduler - gem 'clockwork'. Capistrano executes the hook: after :'deploy:finished', :'clockwork:restart' The scheduler is triggered once (after this hook), runs all rake ...
onetwothree's user avatar
0 votes
0 answers
155 views

Ruby clockwork for one-time jobs?

I was thinking about using sneakers as my ActiveJob backend. Unfortunately it does not support delayed messages. But since we're going to use clockwork anyway: is there any mechanism to schedule one-...
Marcus Ilgner's user avatar
2 votes
1 answer
973 views

How to run Clockwork in Heroku

I'm really new to Heroku, but I have a problem. I have created a Clockwork script called "clock.rb" in rails and I use: bundle exec clockwork clock.rb to run it in the background on my local server, ...
jorgeregidor's user avatar
5 votes
0 answers
678 views

log rotation inter-process lock failed opswork clockwork

I am using opswork with t2.medium machine with ruby clockwork running in it. every 30 seconds we are triggering a job. SPAWNED BG JOB FOR TASK: 20 for SC: 20 with Sidekiq id: ...
shakeel's user avatar
  • 901
0 votes
1 answer
460 views

How to initialize rails 5.1 environment from ruby script for clockwork

I need to initialise rails from an arbitrary script so that I can access some ActiveRecord objects using Clockwork UPDATE: The issue only occurs when require 'clockwork' and require_relative './...
JamesPlayer's user avatar
  • 1,874
0 votes
1 answer
192 views

access all events from clockwork manager to controller

Am using gem clockwork for running scheduled jobs. I need to access all events defined in clock.rb for manually trigger the clockwork events when it fails. For that I forked the clockwork gem by ...
Raj's user avatar
  • 980
1 vote
0 answers
184 views

Clockwork task not running each full hour

I'm using Clockwork version 0.7.0 (yes, I know it's out of date), and I set a job to run each hour: every(1.hour, 'My job', :at => '**:00') But the job is running only once in few hours: 2017-...
bl0ck3d's user avatar
  • 23
0 votes
0 answers
345 views

Clockwork won't run a job in the closest full hour

I'm using clockwork for running a job every full hour (**:00), like this: every(1.hour, 'auto lock', :at => '**:00') But if a add an item for the job, for example at 17:50, the job will run for ...
bl0ck3d's user avatar
  • 23
0 votes
1 answer
322 views

Clock work restart a job after a few minutes in rails

I am using Clock worker gem for back ground process I have a Configuration table which contains key and value. My clock.rb file require 'clockwork' require './config/boot' require './config/...
manish gupta's user avatar
0 votes
2 answers
243 views

Send errors from rails clockwork gem to airbrake?

What is the best way to send errors from clockwork to Airbrake?
knagode's user avatar
  • 6,115
0 votes
1 answer
843 views

superclass mismatch for class Event (TypeError)

I have an event model in my rails app: class Event < ApplicationRecord ... end I am running a clockwork process on clock dyno which has require_relative 'boot' ...
Rishi's user avatar
  • 1
0 votes
1 answer
98 views

Clockwork with a multi-tenant setup

My app uses postgres schemas to implement multi-tenancy. So for a table like users, each tenant actually has it's own users table - public.users (default) foo.users bar.users ... As a side note, it ...
user2490003's user avatar
  • 11.9k
0 votes
2 answers
2k views

How to run clockwork script in production

I am using clockwork gem. I want to automatically delete all comments from comments table every day at midnight. This app/clock.rb script is working as it supposed to in development env.: require './...
ToTenMilan's user avatar
5 votes
4 answers
5k views

How to assure the same job doesn't run twice at the same time?

I have a simple sidekiq job that I've set to run every 5 minutes using clockwork. What I'm worried about is that, if the job takes longer than 5 minutes, it will run again, which could cause some ...
Cisplatin's user avatar
  • 2,998
3 votes
2 answers
1k views

If I schedule a worker to run every day on Heroku, how can I be sure it doesn't run twice or get skipped?

I'm a bit confused as to how Clockwork, Sidekiq, and Redis all fit together on Heroku given that Heroku restarts dynos at least once a day. Say I have a worker that runs once a day, so it's ...
Benjamin's user avatar
  • 3,940
1 vote
1 answer
2k views

Rails find_each is not working

Currently, I'm triggering a SuckerPunch Job via clockwork in my Rails app. User.find_each do |user| puts "Found user: #{user.name}!" end # Doesn't work, too. User.all.each do |user| puts "...
logineimer's user avatar
4 votes
1 answer
1k views

How to trigger Clockwork task at the beginning of the month?

I would like to run task every beginning of the month. E.g.: 2017-01-01 00:00:00 // January has just started 2017-02-01 00:00:00 // February has just started ... ... How to do this using clockwork?
knagode's user avatar
  • 6,115
2 votes
1 answer
551 views

100% reliable clock process on Heroku?

I'm using Rails 5 on Heroku for a very lean payment processing app that will be doing large volumes of processing. The app doesn't have much functionality, which is why it's being hosted there. ...
Tallboy's user avatar
  • 13.4k
0 votes
1 answer
1k views

Run job every 10 minutes with Clockwork

I would like a job to run every 10 minutes in Clockwork, but I want it to run 6 times an hour, at 00, 10, 20, 30, 40, and 50 minutes past. In the Clockwork readme it says you can use wildcards for ...
Benjamin's user avatar
  • 3,940
3 votes
1 answer
800 views

Scheduling with Clockwork/Delayed_Job/ActiveJob to run every 5 minutes (round)

I am reading some sensor values and I want to schedule recurring jobs in order to repeat every :00, :10, :15, :20, :25, :30, :35 etc. I am using clockwork/delayed_job/activeJob & foreman in ...
ftshtw's user avatar
  • 629
1 vote
1 answer
944 views

How can I run a Clockwork job manually?

Title says it all really. Is it possible to run Clockwork jobs manually? E.g. if I have a clock.rb file module Clockwork every(15.minutes, 'api.sync_shifts') do Shift.sync end on(:...
chrismanderson's user avatar
4 votes
0 answers
2k views

How to find bottleneck in Laravel?

I have a large application written using Laravel 5.2. The application seems to be running good for a while "day or two" and then it starts slowing down "each request table 15+ seconds." I am trying ...
Junior's user avatar
  • 12k
0 votes
1 answer
28 views

I18n together with clockwork

When a model method "model_method" is called from clockwork, I18n.locale always equals to my default locale. How do I pass the current locale to the model method? Part of clockwork.rb: every(10....
Nadiya's user avatar
  • 1,527
3 votes
0 answers
342 views

Clockwork gem "at:" time not triggering events

My clockwork script.rb looks like: module Clockwork configure do |config| config[:sleep_timeout] = 1 config[:tz] = 'EST' config[:max_threads] = 15 config[:thread] = true end ...
Jonah's user avatar
  • 16.2k
0 votes
1 answer
485 views

Clockwork gem is trying to access development db in production

I am trying to start the clockwork with following command sudo bundle exec clockwork config/clock.rb in production. But it throws the following error ActiveRecord::AdapterNotSpecified: 'development' ...
shiva kumar's user avatar
  • 11.4k
1 vote
1 answer
183 views

Sidekiq sporadically is getting nil for active records queries

My project consists of a machine that has clockwork, that creates new models in the DB. I also have in the model after_create creating a sidekiq task using perform_async. My problem is this: ...
Himberjack's user avatar
  • 5,792
0 votes
1 answer
536 views

Run clockwork only on one production instance (rails capistrano)

I have a production server with two instances app1 and app2 to which I use capistrano to deploy my application, ie: cap app1 deploy, cap app2 deploy. I am now configuring the clockwork to schedule my ...
Miroslav's user avatar
  • 176
1 vote
2 answers
422 views

Date.today not corresponding to the actual date

I noticed a very strange issue in my logs with regards to the current time when using Date.today method. Basically, I have a cron job (using clockwork) that runs every night at 00:00, to check which ...
tomor's user avatar
  • 1,765
-1 votes
1 answer
409 views

Dynamically generating a clock file (or any file) during Rails deployment on Heroku

I use the Clockwork gem to schedule jobs on my Rails app deployed with Heroku. For the unfamiliar, it basically reads from a clock.rb file in your app root.. # config.rb # Schedule every Monday @ ...
user2490003's user avatar
  • 11.9k
7 votes
1 answer
1k views

Rails clockwork not running code

I'm using the gem 'clockwork' in a Rails 3.2 app. The app is running on Heroku. The clock job runs at 1am - but it's not executing the code. Here is the clock.rb code: Clockwork.every(1.day, '...
Reddirt's user avatar
  • 5,953
3 votes
2 answers
3k views

Laravel disable provider (Clockwork) on fly

I'm having a laravel setup with the Clockwork installed. And I have a artisan command that takes really long time to run, so that clockwork will consume too much memory. I still need that extension. ...
Konstantin Bodnia's user avatar
2 votes
2 answers
1k views

RailsAdmin Could not load model while using Clockwork and CKEditor

I'm currently getting 2 errors. The one in the logs includes: [RailsAdmin] Could not load model Clock, assuming model is non existing. The other is when I run the tests to access rails_admin: ...
LMo's user avatar
  • 1,429
1 vote
1 answer
171 views

RSS - Feedjira updates, clock work gem in rails

I am new to rails so I watched railscast #168 to get an understand of how feedjira works. I got an idea how it works now. I got the functionalities to work as well. Where I struggle is at the update ...
Victor Blomberg's user avatar
1 vote
1 answer
1k views

clockwork gem not running the job when :at => "some time" is given

I am trying to setup clockwork for a recurring job. (Rails 4.2) The following code from the gem read-me in app/clock.rb works and every 30 seconds the background task is fired and email is sent. ...
sharamb's user avatar
  • 53
3 votes
0 answers
316 views

Clockwork not logging to Heroku console

I am using the Clockwork gem to run a series of rake tasks. All looks good, but it seems the puts commands dont appear in the logs, and was just wondering if anyone had any idea why? require File....
bnussey's user avatar
  • 1,964
1 vote
1 answer
783 views

Separate clock process from sidekiq workers on Docker

I am currently working on moving my environment off Heroku and part of my application is runs a clock process that sets off a Sidekiq background job. As I understand it, Sidekiq is composed of a ...
Karim's user avatar
  • 1,313
6 votes
1 answer
301 views

Does Clockwork require its own process?

I've seen people say in a couple of different places that clockwork should be run on its own dyno, with a procfile that might look something like this (example from heroku): clock: bundle exec ...
toddmetheny's user avatar
  • 4,433
0 votes
1 answer
531 views

Sidekiq with Clockwork triggers but doesn't process job on heroku

Running: sidekiq 2.1.17, rails 3.2.21 I'm trying to use clockwork to schedule some recurring tasks to be done by sidekiq workers. Running foreman in development, everything runs perfectly as ...
toddmetheny's user avatar
  • 4,433
5 votes
2 answers
1k views

Clockwork to queue ActiveJob background jobs

Running Rails 4.2.0 so I am using the ActiveJob w/ Sidekiq backend. I need to invoke regularly scheduled background jobs so I am hoping to use Clockwork, but I haven't seen any examples of how to use ...
omencat's user avatar
  • 1,165
1 vote
1 answer
453 views

NameError using Rails, Sidekiq & Clockwork

Looking at the 'Example clock.rb file' here in the documentation, you can see that my code follows the clockwork conventions (?) exactly. However, I'm getting this error that I can't seem to fix. I've ...
funfuntime's user avatar
1 vote
0 answers
467 views

Clockwork with Resque queueing duplicate jobs

I'm using database events and resque to queue specific tasks, but it looks like it's enqueueing the job multiple times: 16:27:00 scheduler.1 | I, [2014-09-21T16:27:00.916001 #21736] INFO -- : ...
Xavier's user avatar
  • 3,513
3 votes
1 answer
1k views

Schedule clockwork to run only on a specific date of the year

I been trying schedule a job with clockwork to run only on day eg. February 14. But I'm not sure if is this possible because the documentation formats do not have this possibility. I know that I can ...
monteirobrena's user avatar
13 votes
2 answers
1k views

Heroku clock process: how to ensure jobs weren't skipped?

I'm building a Heroku app that relies on scheduled jobs. We were previously using Heroku Scheduler but clock processes seem more flexible and robust. So now we're using a clock process to enqueue ...
oregontrail256's user avatar
0 votes
1 answer
698 views

Clockwork and Resque

I am trying to run a simple task to test out using resque and clockwork together. My worker: app/workers/logger_helper.rb class LoggerHelper @queue = :log_queue def self.before_perform ...
David Moore's user avatar
2 votes
2 answers
3k views

Scheduled Jobs and Custom Clock Processes with Clockwork

I am trying to understand how to execute custom code with clockwork. This is the example lib/clock.rb file that Heroku uses in its devcenter document. require File.expand_path('../../config/boot', ...
user3646037's user avatar