问题
I am assuming that someone has reserved 4:30 now and wants to save it to the server and notify the server from the server at 4:30.
I do not want to use the alarm system built into the smartphone.
I also watched Firebase cloud function lectures on YouTube and implemented them. And I've also seen CronJobs, which gets into the URL by alarm on time and executes the function. I have to set the time for the user and give an alarm to each individual.
回答1:
There is no straight forward way of doing this, but you can go ahead and create a custom scheduler to work around it. A great article with step by step instructions was released by the angularfirebase people at:
https://angularfirebase.com/lessons/scheduled-tasks-and-cron-jobs-with-firebase/
回答2:
You may want to look at schedule functions looks like you can do something like:
export scheduledFunction = functions.pubsub.schedule('every 5 minutes')
.onRun((context) => {
console.log('This will be run every 5 minutes!');
});
来源:https://stackoverflow.com/questions/46645164/schedule-jobs-in-firebase