Module: Philiprehberger::CronKit::Aliases
- Defined in:
- lib/philiprehberger/cron_kit/aliases.rb
Overview
Maps non-standard cron aliases to their 5-field equivalents.
Constant Summary collapse
- MAPPINGS =
{ '@yearly' => '0 0 1 1 *', '@annually' => '0 0 1 1 *', '@monthly' => '0 0 1 * *', '@weekly' => '0 0 * * 0', '@daily' => '0 0 * * *', '@hourly' => '0 * * * *' }.freeze
Class Method Summary collapse
-
.expand(expression) ⇒ Object
Expand an alias to its 5-field cron expression, or return the input unchanged.
Class Method Details
.expand(expression) ⇒ Object
Expand an alias to its 5-field cron expression, or return the input unchanged.
17 18 19 |
# File 'lib/philiprehberger/cron_kit/aliases.rb', line 17 def self.(expression) MAPPINGS.fetch(expression.strip.downcase, expression) end |