okrutny
okrutny

Reputation: 1110

Can't create recurring event in django-scheduler

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?

Upvotes: 2

Views: 909

Answers (1)

Davy
Davy

Reputation: 1796

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

Upvotes: 0

Related Questions