Closed adampatarino closed 7 years ago
@adampatarino
I didn't see documentation on how to programmatically schedule jobs based on Kue's JSON API
kue-scheduler
use kue for its internal and everything depends on kue
except for every job which mix both redis key expiry events
and kue job processing
. If you want to schedule i will suggest to have a custom endpoints to which you will kick your jobs based on kue-scheduler
.
When creating a post object, what fields do I need to ensure are included?
All kue
required job attributes must be provided. So in your custom endpoint you will build the job and use kue-scheduler
to schedule a job as described on usage.
Will Kue-scheduler know to make the rest of those fields?
Yes. Once have a job instance and pass to kue-scheduler
scheduling API the rest will happen if things work as expected.
Or do you have a different recommendation on using the Kue Api with kue-scheduler?
Sincerely, I have been using kue-scheduler in all projects since its inception i.e for sending push notification, SMS, E-mail & any work that fit to run on independent process or background. I don't have a clean & concrete UI so far but I had a plan to improve on kue ui
and kue json api
to support kue-scheduler
.
Hope it helps.
Thanks @lykmapipo
Ok, that makes sense. I can just make my own middleware API that programmatically creates the jobs, etc. Thanks for the advice!
I'm building a custom UI for Kue and Kue-scheduler where users can submit their own jobs. I didn't see documentation on how to programmatically schedule jobs based on Kue's JSON API. Looking in Redis, I noticed that scheduler adds some fields to each job:
When creating a post object, what fields do I need to ensure are included? My guess is
data.unique
, andreccurInterval
? Will Kue-scheduler know to make the rest of those fields? If not, how areexpiryKey
anddataKey
generated? Or do you have a different recommendation on using the Kue Api with kue-scheduler?