I want to send a reminder every 6 months to soil fertilize

When you’re doing an if comparison between two variables, values etc you need to use == rather than =
By using = you have set the value of currentDate to the result of String(day(8)) + "/" + month(5) + "/" + year(2022)

However, this string constructor makes no sense anyway. You’d be far better using “8/5/22” as a string literal.
But of course, you’ll need to upload a new sketch every 6 months with a new reminder date!

Also, every time your void loop executes, or the timer that you use to call the code that you move out of your void loop executes, and that string comparison will evaluate as true, an event will be created and a notification will be sent.
Events are limited to one per minute, and are limited to 100 per day.
So, depending on how your alert is configured, you’ll get 100 alerts at 1 minute intervals, then you’ll be banned from logging anymore alerts for 24 hours…

You should read this…

And also look for a way to input a reminder date via the app or web dashboard rather than hard coding this data.


1 Like