如何使用Heroku的免费网站创建计划任务?

Dav*_*ave 8 cron heroku scheduled-tasks

我正在使用Rails 4.2.7.我想用Heroku托管我的应用程序,所以我首先决定创建免费的爱好帐户,看看一切是如何运作的.我想创建一个每天运行的任务,所以阅读Heroku的调度程序应用程序.但是,当我尝试添加加载项时,我收到错误

$ heroku addons:create scheduler:standard
Creating scheduler:standard on ? myproject... !
 ?    Please verify your account to install this add-on plan (please enter a credit card) For more information, see https://devcenter.heroku.com/categories/billing Verify now at
 ?    https://heroku.com/verify
Run Code Online (Sandbox Code Playgroud)

我还没准备好支付任何款项.如何创建计划任务或Heroku不是一个很好的托管服务,如果没有,我还应该去哪里?

Sou*_*osh 3

You must verify your account to use add-ons (some exceptions are there, like Heroku Postgres and Heroku Connect add-ons).

You don't need to spend any money to verify your account. You need to have a valid credit card. Heroku will try to verify the credit card and on successful verification, your account will be verified. You can read more information about accepted credit cards and detailed verification procedure here.

Quoting from the link mentioned above,

Heroku needs to be able to reliably identify and contact our users in the event of an issue. We have found that having a credit card on file provides the most reliable way of obtaining verified contact information. Account verification also helps us with abuse prevention.

You must verify your account if you, or collaborators of your app, want to:

  • Add any add-on to the app, even if the add-on is free. The only exceptions to this are the free plans for the Heroku Postgres and Heroku Connect add-ons, which can be added without verification.

如果您没有信用卡或借记卡(或者没有我们能够接受的信用卡或借记卡),您仍然可以使用 Heroku 不需要帐户验证的部分。

因此,目前除了使用信用卡之外,没有其他选项可以验证您的帐户。

我使用RedHat 的openshift online(1X CPU-512MB 内存-1GB 存储,3 个免费装备),但最近,他们在构建Openshift Online(下一代)时停止了新注册。您可以申请开发者预览版并使用 30 天,但等待名单太长。在开发者预览期间,OpenShift Online(下一代)是免费的(2 GiB 内存、4 个 CPU 核心和 2 x 1 GiB 持久卷、1 个项目)。