Job
Last updated
Was this helpful?
Was this helpful?
const { job } = require('decorators')
class JobTest {
@job('*/1 * * * *', { name: 'hello_job' })
maintenance({ context, runtime }) {
return {
context,
runtime,
value: 'hello from job'
}
}
}
class JobTestOverride {
// JobTest hello_job will be overwritten by this new job
@job('*/2 * * * *', { name: 'hello_job', weight: 1 })
maintenance({ context, runtime }) {
return {
context,
runtime,
value: 'hello from overwritten job'
}
}
}