-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Is there a way to implement scheduled push? #1628
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
As with scheduled background jobs, the best way to implement scheduled push notifications on Parse Server is to use a cron job or your favorite scheduling npm. |
@hramos I have an application in which users must send other users information which they will be notified about in the future. The time intervals aren't always the same and users can send the information whenever they please. I don't think a scheduling npm is applicable considering that the time intervals are randomized and users can send the information at any time. This task was easily accomplished with push_time in cloud code but that isn't currently supported. Is there any other way around this issue or am I misinformed that a scheduling npm isn't applicable in this situation. (NOTE: I'm not running the server locally either. My parse-server is deployed on mLab.) |
You can use kue to define specific scheduled jobs with any time interval you want. This is what I use. |
@baymitchell12 mLab only hosts your database. Your Parse Server must be running elsewhere, where you should have at least the option to use kue like @AmbroiseCollon suggested. |
@hramos My server is a modified fork of the parse server example deployed through heroku with mLab hosting the database. So kue would be a viable option? |
Yes, you can expand the Parse server example project to implement this functionality. |
@AmbroiseCollon Can you share me how to implement Kue with Parse-server? I am building a system where it will make auto payment each month to my users (on 28th of each month). I wrote a cloud code method in main.js to send out payment already, but I don't know how to integrate Kue to call that method. |
Here is a draft. I don't have time to finish it right now. Do not hesitate to copy paste it and finish it for me or to write suggestions. It should put you on the right path at least. https://medium.com/@ambroisecollon/7754cd31d41e |
@AmbroiseCollon Do you have any code available using kue? Can't get to get it to work. |
index.js
cloud file
queue.js
Procfile
|
@AmbroiseCollon Thanks a lot! |
Scheduled push is crucial to many applications. I know that scheduled push is not currently supported on parse-server, but I am wondering if there is a way to implement it now OR when it might be supported (scheduled push implementation is listed under future improvements).
The text was updated successfully, but these errors were encountered: