Class: Specinfra::Command::Solaris::Base::Cron
- Inherits:
-
Base::Cron
- Object
- Base
- Base::Cron
- Specinfra::Command::Solaris::Base::Cron
- Defined in:
- lib/specinfra/command/solaris/base/cron.rb
Class Method Summary collapse
Methods inherited from Base::Cron
Methods inherited from Base
Class Method Details
.check_has_entry(user, entry) ⇒ Object
3 4 5 6 7 8 9 10 |
# File 'lib/specinfra/command/solaris/base/cron.rb', line 3 def check_has_entry(user, entry) entry_escaped = entry.gsub(/\*/, '\\*').gsub(/\[/, '\\[').gsub(/\]/, '\\]').gsub(/\%/, '\\%') if user.nil? "crontab -l | grep -- #{escape(entry_escaped)}" else "crontab -l #{escape(user)} | grep -- #{escape(entry_escaped)}" end end |