
Product
Introducing Tier 1 Reachability: Precision CVE Triage for Enterprise Teams
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.
Adds new methods to ice_cube to create schedules using standard cron expressions.
ice_cube is a sold library for projecting and querying recurrence rules. Cron is the standard for expressing recurrence rules. This gem will allow you to generate ice_cube schedules using standard cron expressions explained here. This includes range expressions, series expressions, "last" day of month, Nth weekday of month, etc.
gem install ice_cube_cron
or add to Gemfile
gem "ice_cube_cron"
# * * * * * * command to execute
# │ │ │ │ │ │
# │ │ │ │ │ │
# │ │ │ │ │ └───── year (optional) (1970–2099)
# │ │ │ │ └───── day of week (0 - 6)
# │ │ │ └────────── month (1 - 12)
# │ │ └─────────────── day of month (1 - 31)
# │ └──────────────────── hour (0 - 23)
# └───────────────────────── min (0 - 59)
Cron expression can be specified using a hash or a string in the format:
require 'ice_cube_cron'
# using cron expression string
schedule = ::IceCube::Schedule.from_cron(::Date.current, "0 0 * * 5")
# using hash
schedule = ::IceCube::Schedule.from_cron(::Date.new(2015, 1, 5), :hour => 0, :minute => 0, :day_of_month => 5)
schedule.occurrences_between(::Date.new(2015, 3, 5), ::Date.new(2015, 6, 5))
# => [2015-03-05 00:00:00 UTC, 2015-04-05 00:00:00 UTC, 2015-05-05 00:00:00 UTC, 2015-06-05 00:00:00 UTC]
desc | interval | year | month | day_of_month | day_of_week |
---|---|---|---|---|---|
1st of every month | 1 | ||||
1st and 15th of every month | 1,15 | ||||
every monday | 1 | ||||
1st tuesday of every month | 2#1 | ||||
ever other friday | 2 | 5 | |||
every 6 months on the 5th | 6 | 5 | |||
last friday of every month | 5L | ||||
last day every month | L |
day
to day_of_month
FAQs
Unknown package
We found that ice_cube_cron demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.
Research
/Security News
Ongoing npm supply chain attack spreads to DuckDB: multiple packages compromised with the same wallet-drainer malware.
Security News
The MCP Steering Committee has launched the official MCP Registry in preview, a central hub for discovering and publishing MCP servers.