No properties cron in serverless framework v3 typescript

With Serverless Framework v3 in typescript, when I try to create a cron lambda function, the properties “cron” doesn’t exist in schedule, but “rate” does exists:

image

Here is the type of schedule of serverless v3:
image

Why is “cron” properties available in a serverless.yml file and not serverless.ts file ?

Original doc: Serverless Framework - AWS Lambda Events - Scheduled & Recurring

found it, you can simply put the entire cron/rate in string as “rate” value:

events: [
    { 
      schedule: {
        rate: "cron(0 */12 * * ? *)",
        enabled: true,
      }
    },
 ]
1 Like