I have a rake task I need to run as a daily job on a Windows XP machine. I discovered the Windows "scheduled tasks" control panel. I'm trying to figure out how to get it to run my Rake task.
Two of the fields are "run" (with a browse button) and "start in". I tried to enter rake mycategory:mytask
into "run" and my Rails project dir containing the Rake task into "start in". The result was a message saying the task "could not start".
How can I get set up a Windows "scheduled task" to run a Rake task?
If you can build a batch file that can execute it properly I would do so, and then you can direct the batch file to run with the task.
Something like this should work:
:: Run task every hour
@call rake stats RAILS_ENV="production"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With