Is Rails's “delayed_job” for cron task really?

后端 未结 6 1116
遥遥无期
遥遥无期 2021-02-04 12:29

delayed_job is at http://github.com/collectiveidea/delayed_job

Can delayed_job have the ability to do cron task? Such as running a script every night at 1am. Or run a

6条回答
  •  感情败类
    2021-02-04 12:59

    I think cron is a better tool for this than delayed_job. I've used it in a project before, and it really excels at running at task in the background or at a particular time. But, for recurring tasks that happen at regular times, I think cron is the best tool.

    Check out whenever (and its Railscast) to easily schedule cron jobs that can run rake tasks (or thor, or shell scripts, or anything else.) You can use the rake tasks to update your models and then have some sort of dashboard controller that looks at the various statuses.

提交回复
热议问题