No commit activity in last 3 years
No release in over 3 years
Helps calculate the next run for schedulers using a human readable syntax.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 2.3.2

Runtime

 Project Readme

periodicity¶ ↑

DESCRIPTION:¶ ↑

Helps calculate the next run for schedulers using a human readable syntax.

SYNOPSIS:¶ ↑

period = Period.new(Time.now).every(2).hours.at(20).from(10).to(15)

means: every 2 hours at :20 from 10:00 to 15:00 (10:20, 12:20, 14:20)

period.next_run # returns the next calculated time as a Time object

Period.new.every(:half).hour # every 30 minutes
Period.new.every.week # every week
Period.new.every(5).seconds # every 5 seconds

REQUIREMENTS:¶ ↑

  • active support (not sure about the exact version yet)

INSTALL:¶ ↑

TODO:¶ ↑

  • add something like “every minute from 20:00 to 21:00 and from 02:00 to 03:00”