rq-scheduler icon indicating copy to clipboard operation
rq-scheduler copied to clipboard

how to set job id in schedule options?

Open mbande opened this issue 9 years ago • 4 comments

mbande avatar Nov 05 '15 11:11 mbande

You can't. That is set by default. But you can use "description".

johnseekins avatar Nov 13 '15 20:11 johnseekins

Recent versions of RQ accepts job_id argument so I think we should support that as well. PR for this welcome :)

selwin avatar Nov 21 '15 04:11 selwin

Reading the code it seems that you should be able use the id keyword argument to set the job id, e.g.:

scheduler.schedule(date, function, args=args, kwargs=kwargs, id=job_id)

malthejorgensen avatar Mar 27 '16 07:03 malthejorgensen

Actually....... more like this: ... Don't pass the arg to "id" use, "job_id" instead. scheduler.enqueue_at(when, func, params, job_id=job_id)

jason-fer avatar Oct 05 '19 02:10 jason-fer