# How can I run a Ruby script in a daily cronjob?

**URL:** https://meta.discourse.org/t/how-can-i-run-a-ruby-script-in-a-daily-cronjob/352129
**Category:** Development
**Created:** [February 13, 2025, 6:34pm UTC](https://meta.discourse.org/t/how-can-i-run-a-ruby-script-in-a-daily-cronjob/352129 "2025-02-13T18:34:38Z")
**Posts on this page:** 1
**Showing post:** 1

<div class="post-metadata">

### Author: ![Xavier\_Garzon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/xavier_garzon/32/485602_2.png) [@Xavier\_Garzon](https://meta.discourse.org/u/Xavier_Garzon)
#### Post date: [February 13, 2025, 6:34pm UTC](https://meta.discourse.org/t/how-can-i-run-a-ruby-script-in-a-daily-cronjob/352129/1 "2025-02-13T18:34:38Z")

</div>

I need to run a simple script daily with specific parameters like this. When I run it manually:

`bundle exec rails runner auto_send_messages_script.rb --messages-limit 3 --sleep-timer 5 --marker welcome_back_campaign_2025 --order-type created_at —-order desc`

I see no errors and everything is fine, I’m new to Ruby and wonder if there is an easy way to run this script and interact with Discourse.

---

_[View the full topic](https://meta.discourse.org/t/how-can-i-run-a-ruby-script-in-a-daily-cronjob/352129)._
