Sha256: ed6ee45a868426f146727cbb9497ad18f13aa08af626a6ee13184e31453d725d

Contents?: true

Size: 423 Bytes

Versions: 82

Compression:

Stored size: 423 Bytes

Contents

class Specinfra::Command::Base::Cron < Specinfra::Command::Base
  class << self
    def check_has_entry(user, entry)
      entry_escaped = entry.gsub(/\*/, '\\*').gsub(/\[/, '\\[').gsub(/\]/, '\\]')
      if user.nil?
        "crontab -l | grep -v \"#\" -- | grep -- #{escape(entry_escaped)}"
      else
        "crontab -u #{escape(user)} -l | grep -v \"#\" | grep -- #{escape(entry_escaped)}"
      end
    end
  end
end

Version data entries

82 entries across 82 versions & 1 rubygems

Version Path
specinfra-2.11.10 lib/specinfra/command/base/cron.rb
specinfra-2.11.9 lib/specinfra/command/base/cron.rb
specinfra-2.11.8 lib/specinfra/command/base/cron.rb
specinfra-2.11.7 lib/specinfra/command/base/cron.rb
specinfra-2.11.6 lib/specinfra/command/base/cron.rb
specinfra-2.11.5 lib/specinfra/command/base/cron.rb
specinfra-2.11.4 lib/specinfra/command/base/cron.rb
specinfra-2.11.3 lib/specinfra/command/base/cron.rb
specinfra-2.11.2 lib/specinfra/command/base/cron.rb
specinfra-2.11.1 lib/specinfra/command/base/cron.rb
specinfra-2.11.0 lib/specinfra/command/base/cron.rb
specinfra-2.10.4 lib/specinfra/command/base/cron.rb
specinfra-2.10.3 lib/specinfra/command/base/cron.rb
specinfra-2.10.2 lib/specinfra/command/base/cron.rb
specinfra-2.10.1 lib/specinfra/command/base/cron.rb
specinfra-2.10.0 lib/specinfra/command/base/cron.rb
specinfra-2.9.3 lib/specinfra/command/base/cron.rb
specinfra-2.9.2 lib/specinfra/command/base/cron.rb
specinfra-2.9.1 lib/specinfra/command/base/cron.rb
specinfra-2.9.0 lib/specinfra/command/base/cron.rb