Forum Replies Created

  • Greg Stein

    Member
    August 8, 2023 at 6:04 pm in reply to: Hourly notifications in my web app

    pffff!! Unbelievable how simple you made it look. Thank you so much again Andreas you have a been a life saver 😊😊

  • Greg Stein

    Member
    August 8, 2023 at 5:39 pm in reply to: Hourly notifications in my web app

    Thank you sooo much for that detailed answer!!!! I needed that “$cinst.$clientcommand(“openpush”, row())” to get started. Currently using a push notification to a JavaScript client using Omnis Studio’s push connection and have it repeated every hour.

    Thanks to you I achieved it by incorporating a loop with a timer in my server-side code. Here’s how I did it and let me know if I could make it better:

    Method SendHourlyNotifications
    Do $cinst.$clientcommand("openpush", row())
    Constant kMessage 'My hourly push notification.'
    Constant kTitle 'Hourly Notification'
    Constant kHourInMilliseconds 3600000
    Calculate kNotificationInterval as kHourInMilliseconds
    While kTrue
    Do $cinst.$pushdata(kMessage)
    Do $cinst.$timer.$wait(kNotificationInterval)
    End While
    End Method

    Awesome support!!!! I didn’t expect a reply in such short notice. You guys are amazing. Thank you again!

    • This reply was modified 11 months, 1 week ago by  Greg Stein.
    • This reply was modified 11 months, 1 week ago by  Greg Stein.
  • Greg Stein

    Member
    August 8, 2023 at 6:29 pm in reply to: Hourly notifications in my web app

    If we are talking about lots of new data and you are just loading a total result set then the timer is probably the way to go.

    That’s it!! And do not wish to overload the database with many unnecessary requests. As of right now I’m avoiding PostgreSQL and MySQL due to my website being hosted on a low end plan so you can imagine the size of trouble I would go through especially that the data is sometimes overwhelming.

    Nevertheless, I’ll definitely revisit your last recommendation once I transition to a more robust hosting plan. Thank you for your invaluable assistance. You seem to have understood my objectives better than I did. Omnis would be fortunate to retain someone as valuable as you👍