Sha256: 987932f5025f72be66a17fde458e6bb195052583a24b2cdee0616b63faf04bed

Contents?: true

Size: 485 Bytes

Versions: 52

Compression:

Stored size: 485 Bytes

Contents

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

    def get_table
      'crontab -l'
    end
  end
end

Version data entries

52 entries across 52 versions & 3 rubygems

Version Path
specinfra-rb19-2.44.7 lib/specinfra/command/base/cron.rb
specinfra-cisco-2.41.0 lib/specinfra/command/base/cron.rb
specinfra-2.53.0 lib/specinfra/command/base/cron.rb
specinfra-2.52.0 lib/specinfra/command/base/cron.rb
specinfra-2.51.2 lib/specinfra/command/base/cron.rb
specinfra-2.51.1 lib/specinfra/command/base/cron.rb
specinfra-2.51.0 lib/specinfra/command/base/cron.rb
specinfra-2.50.4 lib/specinfra/command/base/cron.rb
specinfra-2.50.3 lib/specinfra/command/base/cron.rb
specinfra-2.50.2 lib/specinfra/command/base/cron.rb
specinfra-2.50.1 lib/specinfra/command/base/cron.rb
specinfra-2.50.0 lib/specinfra/command/base/cron.rb
specinfra-2.49.0 lib/specinfra/command/base/cron.rb
specinfra-2.48.0 lib/specinfra/command/base/cron.rb
specinfra-2.47.1 lib/specinfra/command/base/cron.rb
specinfra-2.47.0 lib/specinfra/command/base/cron.rb
specinfra-2.46.0 lib/specinfra/command/base/cron.rb
specinfra-2.45.0 lib/specinfra/command/base/cron.rb
specinfra-2.44.8 lib/specinfra/command/base/cron.rb
specinfra-2.44.7 lib/specinfra/command/base/cron.rb