How to get periodicity from timeseries data?
Looking at your data - the easiest way is to create a Last-N Days hourly average of the binary indicator - and then use a threshold (based on experimentation) to binarize it.
e.g. if your Last 10 Day hourly average looks like this:
0, 0, 0.6, 0.8, 0.9, 1, 0.9, 0.7, 0, 1, 1, 1, 0
Then, a threshold of 0.8 to binarize would result in the following:
0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 0
and - then you could use the time slices associated with the 1's for the recommendation.
This might be the simplest thing you could do - There could however be more sophisticated algorithms out there.