【发布时间】:2016-03-01 13:26:44
【问题描述】:
我是 cron 工作和 rails 的新手。我已经安装了whenever gem。现在我想从tmp/cache/foo.txt删除一个文件。
schedule.rb
every 5.minutes do
command "rm '#{path}/tmp/cache/foo.txt' "
end
当我运行whenever 命令时,它说:
0,5,10,15,20,25,30,35,40,45,50,55 * * * * /bin/bash -l -c 'rm '\''/home/techbirds/shivam/tmp/cache/foo.txt'\'''
## [message] Above is your schedule file converted to cron syntax; your crontab file was not updated.
## [message] Run `whenever --help' for more options
那么如何从头开始呢?
【问题讨论】:
-
用
whenever --update-crontab更新你的crontab
标签: ruby-on-rails ruby cron cron-task whenever