2

I would like to specify an event which results in occurences between hours 16-21, everyday.

How can I accomplish this?

I have already tried a lot to do this, e.g. by specifing Event.start to 16:00 and Event.end to 21:00 with "daily" frequency rule, but no luck. Only occurrences between 15:30 and 16 show up.

enter image description here

the _get_occurrence_list on Event model get's called with half hour intervals.

I already doubt it's possible. Does django-scheduler support such a use case?

okrutny
  • 1,070
  • 10
  • 16
  • what scheduler are you using.? And secondly, are you sure you are not using two different **timezones** , one being **UTC** (maybe in some settings) and one being of the place you are.? – Ankush Raghuvanshi Aug 13 '16 at 17:38
  • django-scheduler I use: https://github.com/llazzaro/django-scheduler This is my time zone setting: TIME_ZONE = 'Europe/Warsaw', and same is set on my Linux. Anyway, if it would be a problem with timezone i assume that it should show occurences through 5 hours as defined in event, just with some offset (a bit up or down on the calendar). But it just shows 2 occurences instead 10... – okrutny Aug 13 '16 at 18:47

1 Answers1

0

Create an event with an HOURLY rule. Then give it these parameter: "byhour:16,17,18,19,20;"

In the database, you should see the following:

  • schedule_event:

    • start = start date, 16h
    • end = start date, 17h (indeed, START date here)
    • rule_id = X (Any number, but same as below X)
  • schedule_rule:

    • id = X
    • frequency = HOURLY
    • params: byhour:16,17,18,19,20;

Reference: http://labix.org/python-dateutil#head-470fa22b2db72000d7abe698a5783a46b0731b57

Davy
  • 1,720
  • 1
  • 19
  • 42