crono icon indicating copy to clipboard operation
crono copied to clipboard

jobs cleanup

Open jalberto opened this issue 9 years ago • 5 comments

When a job is removed from crontab.rb, it must be "marked" as disable or similar so it doesn't run next time

jalberto avatar Apr 10 '15 15:04 jalberto

Fair enough, we will implement it in the next release.

plashchynski avatar Apr 10 '15 15:04 plashchynski

great news :)

Probably will be useful to add a flag to each job, so job can be disabled without removing, eg:

Crono.perform(MyWorker).every 1.week, on: :monday, at: '13:00', state: :disabled

with a sensible default to :active

Then on crono start (or on demand) every job marked to remove can be deleted

jalberto avatar Apr 10 '15 15:04 jalberto

I've looked through the documentation and can not find a way to kill this process. I ran bundle exec crono -d. Is there a way to kill this process? Any help would be greatly appreciated. Thanks!

carolyn-idi avatar Dec 01 '15 06:12 carolyn-idi

@ceospfx you could kill the process using the kill command and pid file:

kill `cat tmp/pids/crono.pid`

plashchynski avatar Jun 26 '16 12:06 plashchynski

Until this feature is implemented the manual way to remove one of the old jobs that still shows up in the web ui. Just grab the name/title of the job and hop in a rails console and run:

Crono::CronoJob.where(job_id: "Perform MyImportantJob every 300 seconds").first.destroy

arronmabrey avatar May 01 '18 16:05 arronmabrey