-
Notifications
You must be signed in to change notification settings - Fork 16
Job.dateEnable
Get: Date
- Returns a JavaScript Date object representing when the job processing can be started.
Example:
const Queue = require('rethinkdb-job-queue')
const q = new Queue()
let job = q.createJob()
q.addJob(job).then(() => {
return q.getJob(job.id)
}).then((savedJobs) => {
// savedJobs[0].dateEnable === The date the job processing can commence.
}).catch(err => console.error(err))
The dateEnable
property of a job determines at what date and time the job is available for processing.
By default, if you do not change the dateEnable
value it is set to the same value as the dateCreated
property. By doing this the job is available for processing immediately.
If you change the dateEnable
value on a job that has not been processed yet, or is queued for a retry, it will be delayed until the current time has moved past the value you assigned.
Warning: On a queue that is not busy it is possible for a custom dateEnable
value to cause the job to be processed after the custom date and on the next master review process. Do not consider the date you assign to be the exact date and time the job will be processed.
For more detail and examples about the dateEnable
property, see the Delayed Job document.
- Introduction
- Tutorial
- Queue Constructor
- Queue Connection
- Queue Options
- Queue PubSub
- Queue Master
- Queue Events
- State Document
- Job Processing
- Job Options
- Job Status
- Job Retry
- Job Repeat
- Job Logging
- Job Editing
- Job Schema
- Job Name
- Complex Job
- Delayed Job
- Cancel Job
- Error Handling
- Queue.createJob
- Queue.addJob
- Queue.getJob
- Queue.findJob
- Queue.findJobByName
- Queue.containsJobByName
- Queue.cancelJob
- Queue.reanimateJob
- Queue.removeJob
- Queue.process
- Queue.review
- Queue.summary
- Queue.ready
- Queue.pause
- Queue.resume
- Queue.reset
- Queue.stop
- Queue.drop
- Queue.Job
- Queue.host
- Queue.port
- Queue.db
- Queue.name
- Queue.r
- Queue.id
- Queue.jobOptions [R/W]
- Queue.changeFeed
- Queue.master
- Queue.masterInterval
- Queue.removeFinishedJobs
- Queue.running
- Queue.concurrency [R/W]
- Queue.paused
- Queue.idle
- Event.ready
- Event.added
- Event.updated
- Event.active
- Event.processing
- Event.progress
- Event.log
- Event.pausing
- Event.paused
- Event.resumed
- Event.completed
- Event.cancelled
- Event.failed
- Event.terminated
- Event.reanimated
- Event.removed
- Event.idle
- Event.reset
- Event.error
- Event.reviewed
- Event.detached
- Event.stopping
- Event.stopped
- Event.dropped
- Job.setName
- Job.setPriority
- Job.setTimeout
- Job.setDateEnable
- Job.setRetryMax
- Job.setRetryDelay
- Job.setRepeat
- Job.setRepeatDelay
- Job.updateProgress
- Job.update
- Job.getCleanCopy
- Job.addLog
- Job.getLastLog