Method: Hookit::Helper::Cron#sanitize_cron
- Defined in:
- lib/hookit/helper/cron.rb
#sanitize_cron(cron) ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/hookit/helper/cron.rb', line 11 def sanitize_cron(cron) time = cron.split(' ') time[0] = compatible_cron(time[0],MINUTES) time[1] = compatible_cron(time[1],HOURS) time[2] = compatible_cron(time[2],DAYS, 1) time[3] = compatible_cron(time[3],MONTHS, 1) time[4] = compatible_cron(time[4],WEEKDAY) time.join(' ') end |