我在Windows上使用RoR,所以第一个问题是:我可以在Windows上使用吗?
此时它根本不起作用。我试过这段代码:
set :output, "#{path}/log/cron.log"
set :environment, 'development'
every 2.minutes do
command "rm '#{path}/log/text.txt'", environment => "development"
end
这是我的控制台,每当命令运行时
whenever
0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,5
6,58 * * * * /bin/bash -l -c 'rm '\''E:/mus/RailsCasts PRO/164-cron-in-ruby-revi
sed/164-cron-in-ruby-revised/schedules-after/log/text.txt'\'' >> E:/mus/RailsCas
ts PRO/164-cron-in-ruby-revised/164-cron-in-ruby-revised/schedules-after/log/cro
n.log 2>&1'
## [message] Above is your schedule file converted to cron syntax; your crontab
file was not updated.
## [message] Run `whenever --help' for more options.
和每当-i:
whenever -i
[fail] Couldn't write crontab; try running `whenever' with no options to ensure
your schedule file is valid.
第二个问题:我需要创建txt文件或xls并在其中添加信息 - 将其发送到PayPal(Mass Pay)。
如何使用这个gem创建文件?
我已经设法将数据导出为xls格式。