How to schedule the notification based on the incremental time span
10 min, 10 hours, 20 hours, 1 day, 5 days, 1 week, 1 month, 5 month, 1 year, 5 years, 10 years.
Notification Message:
for 10 min
You have completed Successfully 10 min
for 10 hours
You have completed Successfully 10 hours
From the little information provided, I would proceed like the following :
Look at NSUserDefaults to see what was the previous iteration
Define a start time based on that previous iteration (if any)
Schedule a local notification using the Local Notifications provided in the iOS SDK.
Save that same date/time in the NSUserDefaults.
Once we reach that time, the notification will be sent (by iOS), and we can execute code to repeat this sequence.
Related
I am sending events to InfluxDB which are timestamped. These are basically events to external service. I wanted to set an alert which would execute if the count of such events from 12 AM today to now() extends a certain number, an alert should be raised.
I have checked out Influx but it seems that you can lookback only some constant time such as 5 mins, 10 mins, 1 hr, 12 hr, 1 day etc from now(). But for me the lookback is dynamic.
Please help with some pointers to achieve this.
I'd like to trigger esper as soon as it receives X number of events during an interval of Y minutes. I used this query but it triggers esper only 5 minutes after having received the first event and only if it's more then 10:
select count(*) as total
from report.win:time_batch(5 minutes)
where type = 'test_type'
having count(*) >= 10
I'd like to trigger it as soon as it gets 10 messages and of course, it should evaluate an interval of 5 minutes. I do not want to trigger it if, for instance, it receives 1 event every 10 minutes.
Any ideas?
Thanks!
select count(*) as total
from report(type = 'test_type')#time(5 minutes)
having count(*) >= 10
Above query outputs a row each time count 10 or more considering 5 minutes sliding. Add for example "output first every 1 minute" if the desired output is just once every X minutes.
Here are my problems :
Schedule local notifications between two dates every specific day of the week . example : between march 1 and march 20 every sunday
I have more than 64 local notifications to set which is the limit .
For the first problem i know there is repeatIntervals which i can set to fire notification every Sunday but how can i set them between two dates ? Do i need to calculate manually and find all the Sundays between March 1 and 20 and then set it or there is something better ?
Use the NSCalendar to get the specific dates, put in an array, and pass to the scheduleLocalNotification.
In this topic you can have a sample code of how to do it.
I need to fire a local notification which is decided by the end user.
I provide 8/9 options to the user for selecting at least one of below time duration.
20 minutes , 25 minutes till 60 minutes.
Again user provides the starting time.
Consider the time duration is morning 6.28 to night 11.37
The expected tasks performed by the local notification is
show a local notification after every 20 minutes between the duration of 6.28 am to 11.37 pm.
first notification will come at 6.48 am. And till its 11.37 . No notification should come after 11.37.
Is there any way ?
UILocalNotification has a repeatInterval property which you'd normally use to create recurring notifications. Unfortunately, it does not offer the flexibility you need - you can use repeat intervals of 1 minute, 1 hour, but nothing in between. And there's also no 'end date' option.
The only other option is to create multiple notifications, each firing only once. Keep in mind that there is a maximum of 64 notifications per app. With a minimum interval of 20 minutes, this covers 21 hours and 20 minutes of notifications.
UILocalNotification has repeatInterval property.
UILocalNotification *localNotif = [[UILocalNotification alloc] init];
localNotif.repeatInterval = NSMinuteCalendarUnit;
Try above code.
I've set up a Jenkins job and set the poll interval at 1 minute (I used this syntax 0 * * * *).
Looking in the Polling log I can see its reported that a poll call was made as soon as I saved the changes to the job.
But not over 10 minutes later it hasn't made any other polls.
Any suggestions how I can proceed determining the problem?
You're looking for "* * * * *".
Jenkins gives a warning since every minute can be a bit excessive, but your version control server shouldn't have any problems handling the load.
Your cron syntax is set to poll once per hour, at zero minutes past the hour. From the Jenkins help text:
This field follows the syntax of cron (with minor differences). Specifically, each line consists of 5 fields separated by TAB or whitespace:
MINUTE HOUR DOM MONTH DOW
MINUTE Minutes within the hour (0-59)
HOUR The hour of the day (0-23)
DOM The day of the month (1-31)
MONTH The month (1-12)
DOW The day of the week (0-7) where 0 and 7 are Sunday.