title: creating a datetime series that has non-standard repeat pattern
body: <p>I'm a very novice programmer trying to use python to build a table that links date-time events to a specific work shift that has a non-standard repeat pattern. In this case each shift has a duration of 24 hours 'on' then 24 hours 'off', this repeats 3 times, then there is a 4 day 'off' period, and then the series begins again.</p>
  <p>So far I've been able to create one cycle of this pattern (see below) but I'm stuck on how to repeat this sequence over a longer duration (ideally I would like to build a year-long table).</p>
  <p>(I also know that creating a datetime table involving seconds is very inefficient, but these shifts also have a non-standard period duration (with days beginning and ending at 8AM-so I was also stuck on how to match date-time events without resorting to exact datetime matching with seconds)</p>
  <pre><code>import pandas as pd
  from pandas.tseries.offsets import Day
   
  a_shift = pd.Series(pd.date_range(&quot;2022-01-02 00:08:00&quot;, periods=86400, freq='S'))
  a_shift = a_shift.to_frame()
  a_shift2 = a_shift + pd.offsets.Day(2)
  a_shift3 = a_shift2 + pd.offsets.Day(2)
  a_shift4 = a_shift3 + pd.offsets.Day(5)
  
  a_shift = pd.concat([a_shift, a_shift2, a_shift3, a_shift4])
  
  ... repeat x times until end_datetime
  
  </code></pre>