you could expose a route, that way all the running merb stuff is used...

/do-stuff > controller:cronstuff > action:do-stuff

2010/3/17 George Adamson <[email protected]>

> Ok, good idea. How would the script use the environment-dependent
> connection settings and a couple of rb files that exist in the merb
> app?
>
> Secondly, I'm running on JRuby in windows. JRuby takes a few seconds
> to start up on windows, and it hogs the cpu while it initialises.
> Presumably a ruby script set up to run periodically (on some sort of
> schedule equivalent to cron) would cause this cpu load every time it
> ran? If so then this solution would not be viable.
>
> George
>
> On Mar 16, 5:55 pm, Pavel Kunc <[email protected]> wrote:
> > I agree with Markus.
> >
> > You should do this on other layer than in your Merb app. If you want
> > to bundle functionality in your app. Than I'd write Importer (so I can
> > test it) and than either simple wrapper ruby scrip which will be run
> > by Cron or you can have Rake task instead of wrapper script.
> >
> > Pavel
> >
> > On Mar 16, 4:40 pm, Markus Schirp <[email protected]> wrote:
> >
> > > Hi,
> >
> > > I would setup a cron job, executing an script doing the imports.
> >
> > > --
> >
> > > Markus
> >
> > > On Tue, Mar 16, 2010 at 08:09:42AM -0700, George Adamson wrote:
> > > > Hi there,
> >
> > > > I have function to import new files from a folder. How would you set
> > > > up merb to run this function periodically?
> >
> > > > (I'm fairly new to ruby and merb and so far I have deduced that the
> > > > solution will probably involve Merb::Worker, but I don't know how.)
> >
> > > > Many thanks,
> > > > George
> >
> > > > --
> > > > You received this message because you are subscribed to the Google
> Groups "merb" group.
> > > > To post to this group, send email to [email protected].
> > > > To unsubscribe from this group, send email to
> [email protected] <merb%[email protected]>.
> > > > For more options, visit this group athttp://
> groups.google.com/group/merb?hl=en.
> >
> >
>
> --
> You received this message because you are subscribed to the Google Groups
> "merb" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected] <merb%[email protected]>.
> For more options, visit this group at
> http://groups.google.com/group/merb?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"merb" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to [email protected].
For more options, visit this group at http://groups.google.com/group/merb?hl=en.

Reply via email to