Questions tagged [ice-cube]

ice_cube is a ruby library for easily handling repeated events (schedules). The API is modeled after iCalendar repeated dates.

ice_cube is a ruby library for easily handling repeated events (schedules). The API is modeled after iCalendar repeated dates.

Resources:

47 questions
0
votes
1 answer

rails 4.2.5 simple_form, ice_cube and recurring_select

I'm using recurring_select and ice_cube to let the user define recurring events. I'm storing the serialized IceCube-Schedule in a string-Attribute. The event-Model includes this code: include IceCube serialize :schedule, IceCube::Schedule The…
secador de pelo
  • 687
  • 5
  • 26
0
votes
2 answers

Identify IceCube recurring events by ID once they have occurred

I am attempting to use the ice_cube gem to set up a schedule for recurring shifts. What I am struggling with is the recurring events are not real instances of my model with an ID; I need to be able to reference each event to associate it with a…
Harry
  • 4,660
  • 7
  • 37
  • 65
0
votes
1 answer

how do I enable recurring reminders for different users in ruby?

Currently, the users for my app set a specific date and time for a single reminder (using the Chronic gem). I have a cron job which runs every 10 minutes and checks if the time in the reminder is < Time.now at which point, it sends the reminder and…
Satchel
  • 16,414
  • 23
  • 106
  • 192
0
votes
1 answer

Can I specify week 0 in ice_cube gem when I want to a job to run every 2 weeks?

I have this recurring job in our Rails service that sends out emails on Friday every two weeks. However, based on our business requirement, the first week of the "every two weeks" schedule should be this week, which means the email should be sent…
0
votes
2 answers

IceCube/Ruby A rule for every 1 month and 10 days

Is it possible to make a rule like every 1 month and 10 days? Obviously 40 days isn't correct since months have a variable number of days in them, and it isn't by day of month or a particular day of the week? Something that would…
Greg Olsen
  • 1,370
  • 17
  • 28
0
votes
2 answers

How to schedule Sidekiq jobs according to a recurring schedule in database?

I've set up a system where Measurements are run based on MeasurementSettings. Each setting defines a schedule using ice_cube (and some other properties for measurements). I'm able to edit this schedule for each setting and then poll for the next…
slhck
  • 36,575
  • 28
  • 148
  • 201
0
votes
1 answer

Ice cube, how to set a rule of every day at a certain time for Sidetiq/Fist of Fury

Per docs I thought it would be (for everyday at 3pm) daily.hour_of_day(15) What I'm getting is a random mess. First, it's executing whenever I push to Heroku regardless of time, and then beyond that, seemingly randomly. So the latest push to Heroku…
james
  • 3,989
  • 8
  • 47
  • 102
0
votes
1 answer

Quick explanation of recurrence rules via ice_cube for fist of fury/ sucker punch

This is probably not the brightest question... feeling especially dense about this. I'm using a really nifty gem, Fist of Fury, to do recurring background tasks with Sucker Punch: https://github.com/facto/fist_of_fury. As the author of the gem…
james
  • 3,989
  • 8
  • 47
  • 102
0
votes
1 answer

Compare an array of dates to one day (in a rails calendar)

I'm using the calendar helper from Railscast: http://railscasts.com/episodes/213-calendars-revised but I'm running into a problem (calendar helper below): module CalendarHelper def calendar(date = Date.today, &block) Calendar.new(self, date,…
andrewmarkle
  • 221
  • 3
  • 9
0
votes
1 answer

One-day-off error using Ice_Cube gem to schedule day_of_month events

HOLIDAYS = Schedule.new(Date.new(2012,1,1)) HOLIDAYS.add_recurrence_rule Rule.yearly.month_of_year(:october).day_of_month(31) When I check HOLIDAYS.occurs_on? for 10/31/12 I get FALSE, but when I check for 10/30/12 I get TRUE. What am I doing…
Dave
  • 7,460
  • 3
  • 26
  • 39
0
votes
2 answers

full calendar change event color

i have been trying to change the color of my event with no success. my git-ripo is https://github.com/mzararagoza/rails-fullcalendar-icecube and there is a sample of the site. i am loading my event on with json that looks like…
MZaragoza
  • 10,108
  • 9
  • 71
  • 116
0
votes
1 answer

Ruby Gem ice_cube. How could I store a recurrence rule in database?

I might save a schedule in db repeats = schedule.to_hash or repeats = schedule.to_yaml then use it from db schedule = repeats.from_hash But I need to know what is a rule. For example, if it is repeated weekly, how could I store a rule in db or how…
Gabi
  • 250
  • 1
  • 4
  • 13
0
votes
1 answer

Ice_cube gem and find method in Rails 3

I'm using Ice_cube gem to generate events, and looks fine. The model that implements the recurrency is called "Job" , now I have a list of job, using pagination. I need to sort the Jobs in the list using the next events. The problem is that I'm…
0
votes
1 answer

Using schedule_attributes with ice_cube to populate a form

I'm using Schedule Attributes with Ice Cube to schedule some events with a form, I need to populate the form in editing as in this example: <%= form_for(@event) do |f| %> [...] <%= f.fields_for :schedule_attributes do |schedule| %> Start Date…
Masolino
  • 95
  • 1
  • 8
0
votes
2 answers

serializing an IceCube object for Mongoid

I found this article: Override a Mongoid model's setters and getters to help me, but behavior's still not what I am looking for. My model is like so: class Event include Mongoid::Document include IceCube validates_presence_of :title field…
Paul
  • 35,689
  • 11
  • 93
  • 122