Ok basic overview:
I am making requests to an API endpoint every 31 min. It has to be more than 30 min (The API accepts requests at least 30 min after the last request), and optimally it will be 30 min and 1 second, for lag, but since that is not possible, I am going with 31 min. The higher the interval the less happy I will be since it will be pinging the API less efficiently and fewer times each day.
I am doing this using a scheduled netlify function:
export default exported
export const config = {
schedule: "*/32 * * * *"
}
However, I get this problem:
From the times on the logs, I see it executing every hour at X:00 and X:32, effectively making it run every 32 min then 28 min then 32 min so on. However, the API does not like it when I ping 2 min early, and tells me the bonus is not unlocked. Then, it waits 32 min (wasting 30 min). Therefore, it is currently pinging at half efficiency. How can I get it to ping every 32 min, so like it runs:
12:00
12:32
1:04
1:36
2:08
…
…
Since it will be much better efficiency-wise to ping the API.
