What's not working?
Hi, I believe there are syntax errors in the highlighted lines of code within this section of the documentation.
I believe that this:
import { later, jobs } from 'src/lib/jobs'
export const NightlyReportJob = jobs.createJob({
queue: 'default',
perform: async () => {
await DailyUsageReport.run()
await later(NightlyReportJob, [], {
wait: new Date(new Date().getTime() + 86_400 * 1000),
})
},
})
Should be this, since wait expects a number instead of a Date:
import { later, jobs } from 'src/lib/jobs'
export const NightlyReportJob = jobs.createJob({
queue: 'default',
perform: async () => {
await DailyUsageReport.run()
await later(NightlyReportJob, [], {
wait: 86_400 * 1000,
})
},
})
I'm pretty sure this is correct because, while trying to debug another issue, I attempted to pass along a date to wait and received an error.
How do we reproduce the bug?
No response
What's your environment? (If it applies)
Are you interested in working on this?
What's not working?
Hi, I believe there are syntax errors in the highlighted lines of code within this section of the documentation.
I believe that this:
Should be this, since
waitexpects a number instead of a Date:I'm pretty sure this is correct because, while trying to debug another issue, I attempted to pass along a date to
waitand received an error.How do we reproduce the bug?
No response
What's your environment? (If it applies)
Are you interested in working on this?