Rails 3 和没有 cron 的重复性任务调度 [英] Rails 3 and scheduling of repetitive tasks without cron

查看:58
本文介绍了Rails 3 和没有 cron 的重复性任务调度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个应用程序,目前正在使用 delay_job.我想知道是否有任何推荐的 gem 来安排重复性任务.

I have a app and i am currently using delayed_job. I was wondering if there are any recommended gems that do scheduling of repetitive tasks.

我想安排以特定频率发生的任务以清理数据库/发送电子邮件/运行其他方法.我有点想每天或每小时运行一些任务.

I want to schedule task that happen on a certain frequency to clean the database/sending emails/run other methods. I mite want to run some tasks every day or every hour.

是否有一些不使用 CRON 且易于设置和配置的好方法.

Is there any good ones out there that are fairly easy to setup and config which do not use CRON.

推荐答案

您可以将重复性工作转换为 rakes 并通过 cron 调用这些 rakes.用于在服务器上设置 cron,无论何时都是不错的宝石在这里结帐 - http://railscasts.com/episodes/164-cron-in-ruby

You can convert that repetitive work to rakes and call those rakes via cron. For setting cron over server, whenever is nice gem checkout here - http://railscasts.com/episodes/164-cron-in-ruby

这篇关于Rails 3 和没有 cron 的重复性任务调度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆