ruby - Quick explanation of recurrence rules via ice_cube for fist of fury/ sucker punch -
Maybe this is not the most generous question ... especially about this dense thing I can do with recurring background tasks To actually use Nifty Gem, the Future of Fury: As the author of the gem, the recurrence rules have been made using the ice cube gem.
He gives an example of a recurring job such as:
classes include SayHiJob Skrapp: jobs include: FistOfFury :: recursive repeat (closely) DRR Rails.logger.info 'Hi!' End of End
I read through Docs for the First of Fury and Ice Cube, both read as the above link, and just want to confirm my understanding. ..
- Fury of fury requires an ice cube rule
recurs {}
to be in brackets,recurs
mandatory Form ofschedule
is the replacement of an ice cube - You can make a predecessor from the Ice Cube You can use the rule, like
equals
in the example ordaily (2)
(every other day), or you can define your own rules -
If you define your rules, then you can keep it right over repetition, because the ice cube's gem has already been already installed with fists of fury,
rule = rule.mothile.day_of_mmth (13) iterative {rule}
If later is correct, I would love to know how to write rules for specific time of day. rule = Rule.daily (2) .time_of_day (3)
means I want to move activity every other day at 3:00.
You should be able to use IceCube time assumptions such as:
< Code> hour_of_day (3) .minute_of_hour (15) .second_of_minute (0)
Hope that helps!
Comments
Post a Comment