This is one way to implement it:
http://blog.darkhax.com/2010/07/30/auto-scale-your-resque-workers-on-heroku

On Tue, Aug 10, 2010 at 11:28 AM, Arpan <[email protected]> wrote:
> Is it possible to use a Cron Job to start a worker, run a series of
> jobs and then shut down the worker?
>
> Basically I am going to have a few jobs that need to run once a day. I
> need to update a large number of records from a supplier on a daily or
> weekly basis.
>
> The job will take a couple hours, but I don't want to have a worker
> running all day as they will be idle the 80% of the time.
>
> Should I just use a cron job on the main dyno. Is there a time limit
> for a cron job and will this slow the main server? I could run it at
> 2AM, when the site is mostly idle.
>
> Or is there a way to start a worker, run the jobs and shut down the
> worker once the jobs are done from cron?
>
> What is the best way to implement this?
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Heroku" 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/heroku?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Heroku" 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/heroku?hl=en.

Reply via email to