Pause / Continue jobs

35 views
Skip to first unread message

Henrique

unread,
Nov 29, 2011, 1:17:02 PM11/29/11
to Rufus Ruby
Hello!

In my application I need to stop/continue the execution of scheduled
jobs. I can use job.uneschedule to stop a job, but is there a way to
start the job again, something like "job.schedule"?

Thank you,

Henrique

John Mettraux

unread,
Nov 29, 2011, 5:29:20 PM11/29/11
to rufus...@googlegroups.com

On Tue, Nov 29, 2011 at 10:17:02AM -0800, Henrique wrote:
>
> In my application I need to stop/continue the execution of scheduled
> jobs. I can use job.uneschedule to stop a job, but is there a way to
> start the job again, something like "job.schedule"?

Hello Henrique,

there is no such thing yet. You could unschedule and then reschedule though.

I think it's an excellent idea. I will add that.


Thanks for the suggestion,

--
John Mettraux - http://lambda.io/processi

John Mettraux

unread,
Dec 11, 2011, 1:08:28 AM12/11/11
to rufus...@googlegroups.com
2011/11/30 John Mettraux <jmet...@gmail.com>:

>
> On Tue, Nov 29, 2011 at 10:17:02AM -0800, Henrique wrote:
>>
>> In my application I need to stop/continue the execution of scheduled
>> jobs. I can use job.uneschedule to stop a job, but is there a way to
>> start the job again, something like "job.schedule"?
>
> there is no such thing yet. You could unschedule and then reschedule though.
>
> I think it's an excellent idea. I will add that.

Hello Henrique,

I've just added Job#pause and #resume and Scheduler#pause(job_id) and
#resume(job_id) to rufus-scheduler:

https://github.com/jmettraux/rufus-scheduler/commit/b4949fa6d8166e74d6eab560f53a53348e6a5023

It's part of rufus-scheduler 2.0.14 which just got released.


Many thanks,

Reply all
Reply to author
Forward
0 new messages