diff --git a/src/getting-started.md b/src/getting-started.md index ad91cb5..59f4ebe 100644 --- a/src/getting-started.md +++ b/src/getting-started.md @@ -55,7 +55,7 @@ cron.schedule('* * * * *', async (ctx) => { console.log(`Task started at ${ctx.triggeredAt.toISOString()}`); console.log(`Scheduled for: ${ctx.dateLocalIso}`); - cosole.log(`Task status ${ctx.task.getStatus()}`) + console.log(`Task status ${ctx.task.getStatus()}`) }); ``` @@ -63,10 +63,10 @@ The same may be done with background tasks: ```js // ./tasks/my-task.js -export function task() => { +export function task(ctx) { console.log(`Task started at ${ctx.triggeredAt.toISOString()}`); console.log(`Scheduled for: ${ctx.dateLocalIso}`); - cosole.log(`Task status ${ctx.task.getStatus()}`) + console.log(`Task status ${ctx.task.getStatus()}`) }; ``` @@ -78,4 +78,4 @@ import cron from 'node-cron'; cron.schedule('*/5 * * * * *', './tasks/my-task.js'); ``` -The `TaskContext` is also passed when listining task events, see more on [Event Listening Guide](https://nodecron.com/event-listening.html#taskcontext-payload) \ No newline at end of file +The `TaskContext` is also passed when listining task events, see more on [Event Listening Guide](https://nodecron.com/event-listening.html#taskcontext-payload)