Closed damienrobson closed 7 years ago
I have a job that runs every 10 minutes. If I want to override a single instance of it and run it now (i.e. via a button press), how should I do it? I figured the following should work, but to no avail:
const job = Jobs.findOne({ 'data.name': name, status: 'waiting' }); if (job) { const j = Jobs.getJob(job._id); j.ready({ time: new Date(), force: true }); }
The playground app implements exactly the functionality you describe.
https://github.com/vsivsi/meteor-job-collection-playground/blob/master/play.coffee#L187
Thanks, @vsivsi - that works a treat :)
I have a job that runs every 10 minutes. If I want to override a single instance of it and run it now (i.e. via a button press), how should I do it? I figured the following should work, but to no avail: