config.yml
cron:
handler: cron
events:
- schedule:
name: schedule-cron
description: "Trigger the every Monday at 08:00 UTC"
rate: cron(0 8 ? * MON *)
Throws an error
Type Error ----------------------------------------------
TypeError: scheduleEvent.replace is not a function
at Scheduler._convertExpressionToCron (J:\project\node_modules\serverless-offline-scheduler\lib\scheduler.js:177:8)
Throws an error
Type Error ----------------------------------------------
TypeError: scheduleEvent.replace is not a function at Scheduler._convertExpressionToCron (J:\project\node_modules\serverless-offline-scheduler\lib\scheduler.js:177:8)
_convertExpressionToCron function received scheduleEvent parameter as an array.
[ 'cron(0 8 ? * MON *)' ]
So replace function doesn't work on the array value. This has to be type-checked, iterated, and replace login should be applied.