LoginSignup
1
2

More than 5 years have passed since last update.

wheneverでRailsのタスクをcronで実行する

Posted at

参考サイト

登録内容の確認

bundle exec whenever

を実行するとcrontabの内容をコンソール出力。
この時点ではまだcrontabに登録されてはいない。

Crontabへ登録

bundle exec whenever --update-crontab

–update-crontabオプションをつけるとcrontabに登録する。
Whenever以外で登録されていたジョブが上書きされることはない。

Crontabから削除

bundle exec whenever --clear-crontab

Cronを止めたい場合は–clear-crontabですべて削除。
登録の場合と同様にWhenever管理外のジョブが削除されることはない。

1
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
2