Forum: Ruby on Rails Timer for executing events

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Bd48c6aec7f4341c92fba616ebc61a5b?d=identicon&s=25 Jordan Isip (jtei)
on 2006-05-29 21:57
Hi Everyone,

I hope you guys can help me out.  What is the best way to go about using
a timer to execute events?  I would like to execute a block of code
every 24 hours (or at midnight - server time).  Is this possible?

What I am trying to get at is that I would like to create a new page
every 24 hours and have that serve as my front page.  Is it possible to
route to this 'new page'?  Any insights on this on any of this would be
great!

Thank you in advance for your help!!
15c43b9d84557e8547eea759ee3ba016?d=identicon&s=25 Victor Fan (victorfan)
on 2006-05-29 22:23
Jordan Isip wrote:
> Hi Everyone,
>
> I hope you guys can help me out.  What is the best way to go about using
> a timer to execute events?  I would like to execute a block of code
> every 24 hours (or at midnight - server time).  Is this possible?
>
> What I am trying to get at is that I would like to create a new page
> every 24 hours and have that serve as my front page.  Is it possible to
> route to this 'new page'?  Any insights on this on any of this would be
> great!
>
> Thank you in advance for your help!!

Hi Jordan,

See if this helps :)
http://wiki.rubyonrails.org/rails/pages/HowToRunBa...

Victor
Bd48c6aec7f4341c92fba616ebc61a5b?d=identicon&s=25 Jordan Isip (jtei)
on 2006-05-30 19:14
Hi Victor,

Thanks for the link.  Would you happen to know if this would work on my
local webrick running windows? or do i need to deploy on a linux server?

Thanks for your help.

Jordan



Victor Fan wrote:
> Jordan Isip wrote:
>> Hi Everyone,
>>
>> I hope you guys can help me out.  What is the best way to go about using
>> a timer to execute events?  I would like to execute a block of code
>> every 24 hours (or at midnight - server time).  Is this possible?
>>
>> What I am trying to get at is that I would like to create a new page
>> every 24 hours and have that serve as my front page.  Is it possible to
>> route to this 'new page'?  Any insights on this on any of this would be
>> great!
>>
>> Thank you in advance for your help!!
>
> Hi Jordan,
>
> See if this helps :)
> http://wiki.rubyonrails.org/rails/pages/HowToRunBa...
>
> Victor
77707eb62b77a12638d1d0a9424afdc9?d=identicon&s=25 Nuno (Guest)
on 2006-05-30 20:30
Jordan Isip wrote:
> Hi Victor,
>
> Thanks for the link.  Would you happen to know if this would work on my
> local webrick running windows? or do i need to deploy on a linux server?
>
> Thanks for your help.
>
> Jordan
>
>

The .script/runner -e production "Model.do_something" solution should
work with any scheduler, I presume you can create a new task with the
Windows XP scheduler and have .script/runner executed when needed

BTW, .script/runner have nothing to do with webrick or any kind of http
server - It is use to run Rails tasks outside the http server.
This topic is locked and can not be replied to.