Time-restricted data entry?

I have quite a few goals where it would be super nice if Beeminder ignored data outside specific time ranges. I think there are two general reasons I often want to do this:

  1. For some goals a big part of why I have the goal is because I want to do X before time Y, like start getting ready for bed by a specific time in the evening or get to work before a specific time in the morning. Changing the goal deadline works great if I’m edge skating. But as soon as I have a bit of buffer I can just do it whenever I want, and, if I maintain that buffer forever, the deadline will never have any influence on me again for that goal.
  2. It’s really tricky to have non-midnight deadlines for goals where I’m entering data automatically via the API, since it requires me building my script such that it respects the deadline. For instance, I have a script that sends how many people I’ve texted that day to Beeminder as a cumulative data point. If I change my Beeminder deadline, I’d also have to modify my script to shift its definition of when a day starts and ends to match. For many of these scripts, just having Beeminder ignore data after the deadline and before midnight would be a sufficient solution.

How do you guys handle issues like these?

I do not use varying deadlines throughout the day, and this does not help with your edgeskate waterfall issues but I do have a lot of custom integrations and I think about them a lot.

I would recommend using Beeminder to aggregate your data, rather than use your script to aggregate data. Beeminder is guaranteed to know your deadline… let it be the single source of truth for it. Every time you text someone, use your automation to update Beeminder, and have Beeminder sum them up.

1 Like

It’s a great suggestion, except for the fact that I’m aggregating based on unique recipients, so there isn’t really a way for me to delegate that aggregation to Beeminder. Even if I tried to make my script only send a data point to Beeminder when I texted a new, unique recipient, that hasn’t solved the problem since the script would still need to know “unique within what timeframe?”

But maybe I’m missing something and I could rework the definition of my goal in such a way that it would still encourage texting multiple different people and the aggregation (if any) could be delegated to Beeminder?

Wouldn’t aggday last or aggday max solve this problem? If you cron it every hour and just tell beeminder to use the last/highest value in each day, you should be covered for any deadline.

The problem with this is that Beeminder cuts you off after 150 data points each day (per goal). I ran into this when I tried to count webpages loaded and solved the problem with this script that increments the latest data point.

1 Like

Oh… That’s really good. I’ll have to think about that one.

1 Like

Alternatively you can ask Beeminder for the current deadline. The goal resource returns the deadline as a number which I would assume to be a unix timestamp.

2 Likes