omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular

    Welcome!

    This is the community forum for my apps Pythonista and Editorial.

    For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.


    Notification module help

    Pythonista
    2
    6
    3087
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • torch0395
      torch0395 last edited by

      I really like the notification module. But it seems as if the alerts can only be triggered by the app opening. Is there a way to trigger alerts by time of day perhaps?

      JonB 1 Reply Last reply Reply Quote 0
      • JonB
        JonB @torch0395 last edited by

        @torch0395
        The delay argument lets you set the date, though a little indirectly, since you must subtract out current time from the future date:

        dalay=time.mktime(time.strptime('20191231 1159','%Y%m%d %H%M'))-time.time()
        

        You can then check the fire_date on the resulting notification to verify you got it correct, using strftime

        1 Reply Last reply Reply Quote 0
        • torch0395
          torch0395 last edited by

          If I want a repeating notification would I just get rid of the date? I need a notification at 6:30 AM, 9:30 AM, 11:30 AM etc..

          1 Reply Last reply Reply Quote 0
          • torch0395
            torch0395 last edited by

            Sorry I forgot to tag @JonB

            JonB 1 Reply Last reply Reply Quote 0
            • JonB
              JonB @torch0395 last edited by

              @torch0395 you might want to look at reminders module, depending on what you are trying to achieve. not sure if you can set up repeating alarms, but it is more geared towards alarms at specific date/times.

              to set up a repeating notification, you have to schedule each and every one. I used to use notifications to run a script to auto-renew my library books -- i had one or two active scheduled, then when the script action ran, it scheduled the next one or two times.

              i feel like ios8 made it much easier for notifications to get buried/lost. not sure about more recent versions... but that sort of soured me on depending on notifications. now i just use a cron job on my pc.

              1 Reply Last reply Reply Quote 0
              • torch0395
                torch0395 last edited by

                @JonB I did actually look into that. I just liked the notifications because you can customize the message and URL when you open notification. I trade and use pythonista as a personal trading assisant. So let's at 9:30 AM est time I was hoping it could send me notifcation to say "U.S market open". When I open the notification it would bring me to my script and I could begin my work for that part of the day. Thank you for your help though

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post
                Powered by NodeBB Forums | Contributors