# Automating a Rake Task

**URL:** <https://www.ruby-forum.com/t/automating-a-rake-task/167117>\
**Category:** Rails\
**Created:** [May 4, 2009, 9:44am UTC](https://www.ruby-forum.com/t/automating-a-rake-task/167117 "2009-05-04T09:44:54Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ddurose](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/8e8cbc/32.png) [@ddurose](https://www.ruby-forum.com/u/ddurose)\
**Post date:** [May 4, 2009, 9:44am UTC](https://www.ruby-forum.com/t/automating-a-rake-task/167117/1 "2009-05-04T09:44:54Z")

</div>

## What is the easiest way (on a machine running Windows) to automate a custom Rake task to run, sleep for 30 minutes, run again and repeat forever?

View this message in context:  
[http://www.nabble.com/Automating-a-Rake-Task-tp23363959p23363959.html](http://www.nabble.com/Automating-a-Rake-Task-tp23363959p23363959.html)  
Sent from the RubyOnRails Users mailing list archive at [Nabble.com](http://Nabble.com).

---

<div class="post-metadata">

**Author:** ![ddurose](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/8e8cbc/32.png) [@ddurose](https://www.ruby-forum.com/u/ddurose)\
**Post date:** [May 4, 2009, 10:37am UTC](https://www.ruby-forum.com/t/automating-a-rake-task/167117/2 "2009-05-04T10:37:07Z")

</div>

Hi,

There is a one way you can follow here and might be it is easiest.

Create bat file in windows and put command to run your rake task in  
that then setup that bat file in windows services and schedule it as  
per need.

Thanks,  
Piyush.
