clockwork icon indicating copy to clipboard operation
clockwork copied to clipboard

Task is not running if previous task in Process

Open brijeshror opened this issue 9 years ago • 3 comments

Hi

For example, there are 2 tasks in clock.rb every(1.week, 'task_1', tz: 'Amsterdam', :at => 'Friday 01:00'){ rake tasks:task_1 } every(1.week, 'task_2', tz: 'Amsterdam', :at => 'Friday 02:00'){ rake tasks:task_2 }

If task_1 is running till 2:00 then task_2 is not started. Let me know how to start task_2 process when task_1 is already in process.

Thanks

brijeshror avatar Jan 27 '17 06:01 brijeshror

Any update on this?

brijeshror avatar Feb 01 '17 06:02 brijeshror

Sorry to jump in with my 10-minute-knowledge about clockwork, but as far as I understood, clockwork runs in a single thread - therefore execution of a task keeps it busy while it runs and it cannot do simultaneous tasks. You would either

  • use the threads option (I'm sure I saw one) to spawn multiple simultaneous processes or
  • (better) use clockwork to start background runners like Rails' ActiveJobs, Sidekiq, Resque, etc. which will run in the background

I hope that helps, I literally have 10 minutes knowledge about this. Cheers

gr8bit avatar Feb 16 '17 01:02 gr8bit

Thanks for update.

brijeshror avatar Feb 16 '17 06:02 brijeshror