# Scheduled workflow is failing at the run time

**URL:** <https://community.temporal.io/t/scheduled-workflow-is-failing-at-the-run-time/7945>\
**Category:** Community Support\
**Tags:** typescript-sdk\
**Created:** [April 17, 2023, 6:25pm UTC](https://community.temporal.io/t/scheduled-workflow-is-failing-at-the-run-time/7945 "2023-04-17T18:25:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mithun\_Shetty\_794](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/mithun_shetty_794/32/5243_2.png) [@Mithun\_Shetty\_794](https://community.temporal.io/u/Mithun_Shetty_794)\
**Post date:** [April 17, 2023, 6:25pm UTC](https://community.temporal.io/t/scheduled-workflow-is-failing-at-the-run-time/7945/1 "2023-04-17T18:25:00Z")

</div>

Scheduled workflow is failing with below error → ```  
Failed to initialize workflow of type ‘example’: no such function is exported by the workflow bundle

```auto
Could some one help us? Also is there a way we can also store the payload as part of the scheduled workflow
```

---

<div class="post-metadata">

**Author:** ![bergundy](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/bergundy/32/900_2.png) [@bergundy](https://community.temporal.io/u/bergundy)\
**Post date:** [April 17, 2023, 6:43pm UTC](https://community.temporal.io/t/scheduled-workflow-is-failing-at-the-run-time/7945/2 "2023-04-17T18:43:26Z")

</div>

The following error happens when you invoke a workflow with the name `example` and don’t export a function named `example` from your `workflowsPath`.

```auto
Failed to initialize workflow of type ‘example’: no such function is exported by the workflow bundle

```

What do you mean by “store the payload”? The payload is stored as part of the workflow execution history if you need to access it externally for whatever reason.

---

<div class="post-metadata">

**Author:** ![Mithun\_Shetty\_794](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/mithun_shetty_794/32/5243_2.png) [@Mithun\_Shetty\_794](https://community.temporal.io/u/Mithun_Shetty_794)\
**Post date:** [April 18, 2023, 7:53am UTC](https://community.temporal.io/t/scheduled-workflow-is-failing-at-the-run-time/7945/3 "2023-04-18T07:53:36Z")

</div>

Is there a way we can also store the payload required for workflow while scheduling the workflow?

---

<div class="post-metadata">

**Author:** ![Alexander\_Malka](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/alexander_malka/32/3643_2.png) [@Alexander\_Malka](https://community.temporal.io/u/Alexander_Malka)\
**Post date:** [April 18, 2023, 12:12pm UTC](https://community.temporal.io/t/scheduled-workflow-is-failing-at-the-run-time/7945/4 "2023-04-18T12:12:31Z")

</div>

I have the same error:  
`TypeError: Failed to initialize workflow of type 'example': no such function is exported by the workflow bundle`

My workflows.ts file exports the function with such name.  
Could the cause of the problem be that my tsconfig has “target” set to “es2017” in “compilerOptions”?
