summaryrefslogtreecommitdiff
path: root/lib/chef/provider
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2020-06-15 22:28:02 -0700
committerGitHub <noreply@github.com>2020-06-15 22:28:02 -0700
commit5314111f2ee818f905725d85b1b350d6d59eede4 (patch)
tree4816fc41a31167cfe3fc4234e3887f3cdb7ca462 /lib/chef/provider
parentad345a5d39e3aa36b56b94481a010dcef0571dda (diff)
parent6a28f8724d33eb5a02ed475dd883e697b0561a36 (diff)
downloadchef-5314111f2ee818f905725d85b1b350d6d59eede4.tar.gz
Merge pull request #10001 from chef/cron_cleanup
Cron and Cron_d resource weekday property fixes
Diffstat (limited to 'lib/chef/provider')
-rw-r--r--lib/chef/provider/cron.rb12
1 files changed, 0 insertions, 12 deletions
diff --git a/lib/chef/provider/cron.rb b/lib/chef/provider/cron.rb
index 8a978b7eca..622f8f5e63 100644
--- a/lib/chef/provider/cron.rb
+++ b/lib/chef/provider/cron.rb
@@ -15,7 +15,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
-
require_relative "../log"
require_relative "../provider"
@@ -27,8 +26,6 @@ class Chef
SPECIAL_TIME_VALUES = %i{reboot yearly annually monthly weekly daily midnight hourly}.freeze
CRON_ATTRIBUTES = %i{minute hour day month weekday time command mailto path shell home environment}.freeze
- WEEKDAY_SYMBOLS = %i{sunday monday tuesday wednesday thursday friday saturday}.freeze
-
CRON_PATTERN = %r{\A([-0-9*,/]+)\s([-0-9*,/]+)\s([-0-9*,/]+)\s([-0-9*,/]+|[a-zA-Z]{3})\s([-0-9*,/]+|[a-zA-Z]{3})\s(.*)}.freeze
SPECIAL_PATTERN = /\A(@(#{SPECIAL_TIME_VALUES.join('|')}))\s(.*)/.freeze
ENV_PATTERN = /\A(\S+)=(\S*)/.freeze
@@ -288,15 +285,6 @@ class Chef
newcron.join("\n")
end
-
- def weekday_in_crontab
- weekday_in_crontab = WEEKDAY_SYMBOLS.index(new_resource.weekday)
- if weekday_in_crontab.nil?
- new_resource.weekday
- else
- weekday_in_crontab.to_s
- end
- end
end
end
end