cordova-plugin-local-notifications icon indicating copy to clipboard operation
cordova-plugin-local-notifications copied to clipboard

trigger match repeats

Open Guiladg opened this issue 6 years ago • 9 comments

When I set a schedule on a specific time, for example { every: { hour: 10, minute: 30 } }, notifications pop every second until 10:31. I just want it to pop once, every day at 10:30. Thanks

Guiladg avatar Aug 27 '18 02:08 Guiladg

Then write a specific piece of code to do it. I recall you have 64 triggers on IOS, if your user doesn't log on to your app in 64 days for you to refresh the code, then your use case is wrong.

rwillett avatar Aug 31 '18 05:08 rwillett

What about add in the config

{ every: { hour: 10, minute: 30 }, count : 1 }

but I'm not sure if this will count the entire cycle of the notification or just in the minute that it matches...

h3nr1ke avatar Aug 31 '18 17:08 h3nr1ke

"Count: 1" is ok for the repeating issue but then it doesn't show a notification the next time it's supoused to. I need a notification every day at the same time besides the user open or not the app.

Guiladg avatar Sep 01 '18 19:09 Guiladg

Set "count" to some high number like 365. Then you will only get one notification per day for a year.

Simpler1 avatar Sep 06 '18 13:09 Simpler1

for me its not working as well, tried to set the count with a higher number, but no luck. the mobile phone keep vibrating when the time comes...

var _config = {
	"title": "Medicine alert",
	"text": "Medicine X",
	"trigger": {
		"every": {
			"hour": 8,
			"minute": 55
		},
		"count" : 365
	}
}

trigger a lot of times without count, trigger few times with count, if count is 9999 the app crashes =(

h3nr1ke avatar Sep 18 '18 12:09 h3nr1ke

Anyone solved this? I have exactly the same issue. Instead of firing once when hour and minute first match current time it fires continuously while they match.

Needs to repeat every day at the same time whether app has been opened or not and only fire once at that time.

jb-72 avatar Sep 22 '18 15:09 jb-72

Following up on this too, experiencing the same thing

philliphartin avatar Oct 16 '18 03:10 philliphartin

Guys any updates on this issue? Are we able to resolve it somehow?

raghav14 avatar May 02 '19 06:05 raghav14

this works for me, thanks a lot! https://github.com/katzer/cordova-plugin-local-notifications/issues/1533#issuecomment-463625420

SamChangi avatar Oct 01 '20 08:10 SamChangi