Hi i have problem with FullCalendar Scheduler because when sending an ajax request with start and end date
/myfeed.php?start=2013-12-01&end=2014-01-12&_=1386054751381
I don't get events which start on 2013-12-01 but end +1/+2 days later.
Does FC have any option for this problem?
Related
I have a couple of monthly plans where user can cancel at any moment. Whats the recommended way to handle a grace period where a user still gets access to the application. For example. If the users signup on 1st July and cancels on 15th July, I would like the provide the user access till 30th July.
i am storing the following columns, current_period_start, current_period_end, canceled_at & ended_at.
should grace period check be something like
def grace_period?
return status == 'canceled' && Time.zone.now < current_period_end
end
any clarification on this would be really helpful. thanks.
You should not "cancel" subscription.
Just update with parameter "cancel_at_period_end: true"
I would like to schedule an event for every 15 seconds and must use flux library.
Using '0 0 +15' I'm able to set a schedule to run every 15 minutes,
However, when I tried for 15 sec my event is not picked up.
Any ideas on how I can resolve this?
Hallo I am pretty new to AppleScript. I try to create attendance generator via pure AppleScript (I know I would use Microsoft Excel VBA for this I wan to use AppleScript only.).
I have this kind of problem. I want to check if in current month are or are not some national holidays (calendar called "Státní svátky"). I run my code and get empty e.g., {} variable. Don't know what is wrong in my code.
-- My isholiday function; i parameter is pointer to day of month i want to test if it is or it is not a holiday
on isholiday(i)
-- Function global variables
set today to current date
set tomorrow to today + 60 * 60 * 24
-- work with calendar app
tell application "Calendar"
tell calendar "Státní svátky" -- national holiday calendar in my iCloud
set currentEvent to every event whose start date is greater than or equal to today and start date is less than or equal to tomorrow
return currentEvent
-- when an event occurs it should tells me right
if currentEvent is not {} then
display dialog "It is not empty!"
end if
end tell
end tell
end isholiday
-- caling the function - i picked 23 for purpose - I did testing event for that day e.g., i know it is not 100% empty
isholiday(23)
Please help me. Thank you!
-- Michael
Calendars that have recurring events often don't use the current year's start date. I would check the start and end dates with this...
tell application "Calendar"
tell calendar "Státní svátky" -- national holiday calendar in my iCloud
return start date of events whose summary = "a holiday name"
end tell
end tell
EDIT
Once you have confirmed that the start date are correct, you can use something along these lines...
tell application "Calendar"
tell calendar "Státní svátky" -- national holiday calendar in my iCloud
set today to current date
set today's time to 0
copy (today + days) to tomorrow
set currentEvents to events whose start date ≥ today and end date ≤ tomorrow
end tell
end tell
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 marks that reminder as sent.
However, I want them to be able to specify recurring reminders. The customer should be able to say, "Every other day at 10am".
I can use ice_cube for the recurring part it seems. Then I use Chronic to come up with the start time which will have the day and recurring time.
But I don't have a good way to make it recurring since these are not separate events in the data base.
Here is what I have tried:
```
reminder = response.body['results'] #array of recurring reminders with start_epoch and 'via'
d {reminder}
reminder.count.times do |i|
schedule = IceCube::Schedule.new(now = Time.at(reminder[i]['value']['start_epoch'])) # get the initial start day and time
schedule.add_recurrence_rule(IceCube::Rule.daily) #makes this a daily recurring, but how can I allow this to be customizable?
if schedule.next_occurrence(Chronic.parse('today at 12:01AM')) < Time.now # Check if today's occurence has happened yet
bot_response = BotResponse.get_bot_response(bot_client_id, reminder[i]['value']['bot_input_keyword'])
if reminder[i]['value']['via'] == 'slack'
slack_response = BotMessage.send_slack(reminder[i]['value']['slack_channel'],
bot_response[:bot_response])
d {slack_response}
end #if
end #if
end #do
```
Questions:
Is there a way to tell when a reminder has been sent without writing each specific daily reminder to a database?
Is there a more elegant way for the user in a text string to define the recurrence?
Have you considered trying the whenever gem to implement recurring tasks through cron jobs? I think you should be able to set the schedule times dynamically in the whenever schedule.rb file, see related issue here: Rails - Whenever gem - Dynamic values
I have a Ruby script using Win32OLE to read through my Outlook events and find events ocurring today (based on the Start date value).
events_today = ''
calendar.Items.each do |appointment|
appt_date = Time.parse(appointment.Start)
if appt_date > today && appt_date < tomorrow
events_today << "<p><strong>#{appointment.Subject}:</strong> #{appt_date.strftime("%I:%M %p")}</p>"
end
end
It catches one-time events that occur today, but it doesn't seem to catch recurring events (ie, events that started last week and occur daily including today).
Is there better field to use to search for the event (other than appointment.Start)?
Use the Items.IncludeRecurrences property:http://msdn.microsoft.com/en-us/library/office/aa171434(v=office.11).aspx