# Serverless Apps On Cloudfare - Questions on Ch. 1

**URL:** <https://forum.devtalk.com/t/serverless-apps-on-cloudfare-questions-on-ch-1/159068>\
**Category:** PragProg Customers\
**Tags:** book-serverless-apps-on-cloudflare\
**Created:** [14 June 2024 22:27 UTC](https://forum.devtalk.com/t/serverless-apps-on-cloudfare-questions-on-ch-1/159068 "2024-06-14T22:27:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Chrisgo-75](https://forum.devtalk.com/user_avatar/forum.devtalk.com/chrisgo-75/32/6151_2.png) [@Chrisgo-75](https://forum.devtalk.com/u/Chrisgo-75)\
**Post date:** [14 June 2024 22:27 UTC](https://forum.devtalk.com/t/serverless-apps-on-cloudfare-questions-on-ch-1/159068/1 "2024-06-14T22:27:21Z")

</div>

@ashleypeacock

1. I wasn’t sure if `/src/index.ts` should contain the “fetch” function or the “scheduled” function. But in looking at the end of Ch. 1 there is an image of “Hello World!” displaying in the browser which helped. So I put `index.ts` back to the way it was (containing the “fetch” function) and created a new file to contain the “scheduled” function.

2. Should the “scheduled” function be called by the worker? And if so how or what triggers it to be called?

3. My code can be found at `https://github.com/Chrisgo-75/serverless_apps_on_cloudfare`  
Thank you  
Chris

---

<div class="post-metadata">

**Author:** ![ashleypeacock](https://forum.devtalk.com/user_avatar/forum.devtalk.com/ashleypeacock/32/4577_2.png) [@ashleypeacock](https://forum.devtalk.com/u/ashleypeacock)\
**Post date:** [18 June 2024 08:28 UTC](https://forum.devtalk.com/t/serverless-apps-on-cloudfare-questions-on-ch-1/159068/2 "2024-06-18T08:28:13Z")

</div>

Hey,

No need to put the scheduled function anywhere - it’s not needed, it’s just there so you know you can schedule things if needed. I can see why it would be confusing though, so I’ll move it to an aside (a little info box) instead, so it doesn’t disrupt the flow of the chapter and doesn’t cause confusion.

Thanks for raising, and for purchasing, and I hope you’re enjoying the book!

Ashley
