I want to send reminder before particular time in java - scheduler

I have calendar events in my java web project,
in which i want to send reminder before some time (time can be minutes/hours/second depends on selection while creating event),
How can i send mails before those particular time?

Related

How to send notification when users don't open app?

I'm working on an ionic project.
If users don't open the application for a long time after downloading my app, I'd like to send them local notification.
For example, I will send a notification if it does not open for 3 days. But I couldn't figure out how.
Can you help me?
You can use the following to send notifications from server:
Create one table in your database to track user activities.
Add columns as userId, lastActivity to store the time of the user's activity.
Update the lastActivity column whenever the user opens the app.
Write one scheduler which will run at a specific time every day.
In the scheduler write a logic to get data from UserActivity table and compare the time stored in the table with your current time.
If the time difference is greater than 3 days then send a notification to that user.
For local notifications here is a way:
Whenever user open's the app schedule the local notification of after 3 days from current date. ( Make sure to remove previously schedule notification before adding new one. )
In this case if user open the app notification will reschedule automatically else notification will fire based on last schedule of it.
You can create a system in which you track user like ,
if user's opens your App then you must update true value for that user with time in your database and now you can compare current time with user's time value and if its more then 3 days you must send notification to that user.

Is there a way to include local time and timezone on APNS Push messages

I need to send out an APNS Push Notification message that needs to include time in the alert message. Is there a way to display this time in the local timezone of the end user (based on current geographic location)?
If the time is part of the alert, there's no way to do that, since you have no control on the display of the alert (except for the language, which can be controlled by sending a loc-key parameter, which gets translated to an actual text in the device, based on the language the device uses).
If you pass the time as a custom parameter of the payload, you can process it in your app and display it however you want (assuming the application was already running, or that the user tapped the notification if it wasn't already running).
If the time is part of the alert text, you'll have to determine the timezone in the server and send the time as it should be displayed.

iphone- Google Calendar

In an app, I want to use Google Calendar. Now my requirement is I get the mail id and events from the user. And now i want to display those events (events means user given in my app) into that particular given mail id (username mail calendar). But without using iphone ical. I want to directly add to the particular mail calendar. (for instance: mail id: xx#gmail.com, event: "title:"meeting" on date: "6-2-2013"" - I get this information from my app). Now i want to go into that xxx#gmail.com and i want to show the events (meeting on 6-2-2013) in that mail calendar. How can i do this without using iCal?

iPhone 4: Determine Calendar Event Date time

i never tried to add/edit event the calendar. but from the documentation(What's New in iOS4), it is clear that we can add/edit event in calendar programmatically. So i just want to ask how can we get all event of particular day ? Basically i want to validate the time of all event for particular day.

Scheduling Email Notifications

I'm trying to figure out a good solution for sending email notifications based on user preference. Users can set up notifications to come
Everytime the event occurs
Once an hour
Once a day
Once a week
Would the best way to do this be to set up a crontab that runs a .php every minute checking to see if anything needs to be sent out? Is there another way/more efficient way to schedule something like this?
I'd say the following:
In case the email should be sent everytime the event occurs, then you don't need any crontab. Just send the email when the event occur.
Run a crontab once an hour. This crontab will fetch all events from the last hour, and send an email with all these events to the users requesting a hourly email.
Do the same once a day and once a week for users with daily and weekly emails preferences.