问题标签 [rufus-scheduler]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
ruby-on-rails-3 - 如何在后台与 Rails 应用程序一起运行计划?
我正在使用 Rufus Scheduler 每天在特定时间发送邮件警报。我在 config/initializers.my 中创建了 task_scheduler.rb 代码是:-
当我运行“rails s”命令时它工作正常。但是当我使用“rails server thin -d”时,它不起作用。谁能告诉我还需要什么才能使它工作?谢谢
ruby-on-rails - 在涉及数据库访问的 ruby on rails 中调度
我想通过电子邮件为订阅用户安排每日报告。
为此,我在 reports_controller 中编写了从数据库中获取数据并使用 pdfkit/wkhtmltopdf 将其转换为 pdf 的操作。
当从 get request 调用时,该操作可以正常工作。但是当转换为这样定义时
与rufus调度程序一起使用时,它会在 send_data 调用中引发异常:
所以,我的问题是我该如何解决这个问题,或者 Rails 中是否有任何替代调度程序在 Windows 和 Linux 上都可以正常工作?
我想知道任何有助于发送从数据库中获取的报告的调度程序。
ruby - Sinatra 中的 Rufus 调度程序
我在 Sinatra 应用程序中使用 Rufus 调度程序。我可以从“scheduler do”块中访问辅助方法吗?我没能做到(我得到一个“未定义的方法 `check' for main:Object”错误)所以现在我必须在 helpers 块中定义方法(也可以在“post '/' do”块中使用它) 然后将方法的主体复制到调度程序块。这没有意义:(有没有办法避免重复?我可以在其他地方定义一个方法并在调度程序中调用它吗?
ruby-on-rails-3 - rufus/调度器每周日
我需要在每周日晚上 9 点使用 rufus 安排一个脚本。
我的 task_schedule.rb 中有以下内容
想知道每个“星期日晚上 9 点”安排它的语法是什么?
ruby - 使用 Sinatra 调度 rake 任务
我正在尝试使用无论何时/rufus-scheduler gem 来安排 rake 任务在 Sinatra 中运行。我似乎无法让任务运行。
这是我一直在尝试的:
任何想法为什么这不起作用?这是最好的称呼吗?
ruby-on-rails-3 - linode ubuntu 中 cron 作业的 Rufus-Scheduler 问题
我的初始化程序/task_scheduler.rb
我的问题是我每 5 分钟收到 12 封报告邮件。我应该每 5 分钟只收到 1 封邮件。我应该使用互斥锁之类的东西吗?请给出一些示例代码。
请帮忙。
提前致谢。
rspec-rails - 运行 rspec 时提取的 Rufus 调度程序任务
我有一个使用 rufus 调度程序每 1 分钟运行一次的计划任务。它的执行没有问题。但是当我尝试运行 rspec 时,任务作为它的一部分运行并且不会让 rspec 完成。如何阻止它被选为规格的一部分
ruby-on-rails - Rufus 调度程序和守护程序脚本在 Rails 中不起作用
我正在制作一个定期运行的脚本,以使用 rufus 调度程序在我的 rails 应用程序中创建一些代码(我将它与守护进程一起使用,专门用于生产服务器)。但它根本不起作用,因为它终止并终止了进程。
这是我的脚本/rufus_schedule 文件
ruby - AppFog 后台工作人员“启动失败”
我正在尝试按照AppFog 指南在 ruby 中创建后台工作人员,但我遇到了一些(可能是菜鸟)问题。该示例使用Rufus-scheduler
, (根据AppFog 上的 Ruby 文档)意味着我需要使用它Bundler
来包含/管理我的应用程序。尽管如此,我已经运行bundle install
,以适当的(“独立”)方式将所有内容推送到 AppFog,但似乎仍然无法使其运行。
我的应用程序和 Gemfile:
...并通过 AF CLI:
我该如何解决(或解决)这个问题?我可能错过了一大步/概念......对红宝石来说非常新=)
提前致谢。
api - Encoding issue when importing Salesforce data into Rails with the Bulk Api
I am trying to do regular imports of data to rails using rufus-scheduler gem and the salesforcebulk gem.
I've been successful in importing data from one salesforce custom object into my database but when I try to import other objects I run into trouble:
Here is the code of the object which is successfully retrieved and imported:
Here is the non-working code:
I've already tried to change the encoding in the CSV parser inside the batch_result method of the salesforcebulk gem without success.
I find very strange that one piece of code is working and the other does not. Perhaps it is something regarding a particular table.