# כיצד להריץ קוד בצד השרת בלחיצה על כפתור?

**URL:** <https://meta.discourse.org/t/how-to-execute-server-side-code-when-clicking-a-button/265795>\
**Category:** Development\
**Created:** [19 במאי,‏ 2023,‏ 3:03pm UTC](https://meta.discourse.org/t/how-to-execute-server-side-code-when-clicking-a-button/265795 "2023-05-19T15:03:07Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![Yogesh\_g](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/yogesh_g/32/253636_2.png) [@Yogesh\_g](https://meta.discourse.org/u/Yogesh_g)\
**Post date:** [20 במאי,‏ 2023,‏ 11:51am UTC](https://meta.discourse.org/t/how-to-execute-server-side-code-when-clicking-a-button/265795/3 "2023-05-20T11:51:46Z")

</div>

I want execute the code inside file Jobs/Secheduled/test\_job.rb

Or you can say I want to run a cron job.

Can you please show me an example code how can I make ajax request to an endpoint and execute the code inside the file.

---

_[View the full topic](https://meta.discourse.org/t/how-to-execute-server-side-code-when-clicking-a-button/265795)._
