Invoking same function at different schedule with different inputs

I’m trying to invoke same function at various times with different inputs. I’ve tried the following but it’s giving me an error that input is unrecognized property

**myfunc:**

** handler: utility.myfunc**

** name: ${self:custom.prefix}-myfunc**

** events:**

** - schedule: cron(0 6 * * ? *) **

** input:**

** timezone: America/New_York**

** - schedule: cron(0 7 * * ? *) **

** input:**

** timezone: America/Chicago**

1 Like

I have this issue to, along with “enabled: true” being unrecognized. Did you ever get a resolution?

Following worked for me

myfunc:
    handler: index.myfunc
    name: ${self:custom.prefix}-myfunc
    events:
      - schedule: 
          name: ${self:custom.prefix}-name1
          rate: cron(0 5 * * ? *) 
          input:
           property:value
      - schedule: 
          name: ${self:custom.prefix}-func2
          rate: cron(0 6 * * ? *) 
          input:
           property2: value2

Ah, that’s curious! I’ve just now been able to fix mine this way:

events:
      - eventBridge:
          schedule: cron(0 23 ? * 5 *)
          input:
            site: CLS
          enabled: true

So effectively I changed “schedule” to “eventBridge”