# Invoking same function at different schedule with different inputs

**URL:** <https://forum.serverless.com/t/invoking-same-function-at-different-schedule-with-different-inputs/13321>\
**Category:** Serverless Framework\
**Tags:** aws, lambda\
**Created:** [December 6, 2020, 5:38pm UTC](https://forum.serverless.com/t/invoking-same-function-at-different-schedule-with-different-inputs/13321 "2020-12-06T17:38:28Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![sam26880](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/sam26880/32/442_2.png) [@sam26880](https://forum.serverless.com/u/sam26880)\
**Post date:** [December 6, 2020, 5:38pm UTC](https://forum.serverless.com/t/invoking-same-function-at-different-schedule-with-different-inputs/13321/1 "2020-12-06T17:38:28Z")

</div>

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\*\*

---

<div class="post-metadata">

**Author:** ![jesse1981](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/jesse1981/32/7516_2.png) [@jesse1981](https://forum.serverless.com/u/jesse1981)\
**Post date:** [June 8, 2023, 1:31am UTC](https://forum.serverless.com/t/invoking-same-function-at-different-schedule-with-different-inputs/13321/3 "2023-06-08T01:31:48Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![sam26880](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/sam26880/32/442_2.png) [@sam26880](https://forum.serverless.com/u/sam26880)\
**Post date:** [June 8, 2023, 2:37am UTC](https://forum.serverless.com/t/invoking-same-function-at-different-schedule-with-different-inputs/13321/4 "2023-06-08T02:37:03Z")

</div>

Following worked for me

```auto
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

```

---

<div class="post-metadata">

**Author:** ![jesse1981](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/jesse1981/32/7516_2.png) [@jesse1981](https://forum.serverless.com/u/jesse1981)\
**Post date:** [June 8, 2023, 2:59am UTC](https://forum.serverless.com/t/invoking-same-function-at-different-schedule-with-different-inputs/13321/5 "2023-06-08T02:59:51Z")

</div>

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

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

```

So effectively I changed “schedule” to “eventBridge”
