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