How to make 'whenever' gem work on Windows?

前端 未结 1 1929
忘掉有多难
忘掉有多难 2020-12-12 02:21

I wan to run \"simple\" cron using whenever on Windows XP. So I installed whenever gem install whenever and then ran my cron.rb

require \'rubyg         


        
相关标签:
1条回答
  • 2020-12-12 03:04

    This gem is a wrapper for the *nix utility cron. We can see in the gem source file command_line.rb line 75 that it uses 'crontab' shell command.

    It will not work on a standard Windows install as this command is not available.

    There are windows versions such as cronw, but I cannot say if these would be compatible with the whenever gem.

    Alternatively you could run your long running task as a windows service. This article should get you started.

    If you must use whenever/cron, perhaps because you are deploying on *nix, try downloading the Binami Rubystack VM - you'll be up and running in minutes.

    0 讨论(0)
提交回复
热议问题