Mark_c
November 6, 2023, 4:17pm
1
I'm almost embarrased to ask about what seems to me to be a very basic issue. How do I call a procedure (or anything else, for that matter) at a specific time of day?
So let's say I want the app to show a notifier at 3 pm saying "It is three pm"
Thanks!
Mark
Anke
November 6, 2023, 4:23pm
2
If the app is open during this time, that's no problem at all. Otherwise you can e.g. use Taifun's AlarmManager extension.
Mark_c
November 6, 2023, 4:25pm
3
Yes, this is assuming the app is open. Sorry, I should have mentioned that
Mark_c
November 6, 2023, 5:04pm
5
Am I missing something here? This is not working for me. Do I need to check the time every minute? Is that set clock1.timerenabled true block wrong?
Thanks for your help, Anke!
Anke
November 6, 2023, 5:13pm
7
What is the current local time in your area?
Mark_c
November 6, 2023, 5:14pm
8
It's just after midnight here. I just tried again with this, but it's not working.
Could that be because I need to re-initialize screen1?
Clock_Trigger.aia (1.9 KB)
Anke
November 6, 2023, 5:22pm
9
It should work.
Connect to Companion, right mouse click on this block, "Do it " and post the result (like I did):
Mark_c
November 6, 2023, 5:26pm
10
the "am" there is lowercase, with your's it's uppercase. Strange
Mark_c
November 6, 2023, 5:29pm
12
It works now. For some reason, mine is lowercase, so I need to change that AM to am.
Thank you so much for your help!
Mark
Anke
November 6, 2023, 5:32pm
13
Try this to get rid of this problem:
1 Like
Mark_c
November 7, 2023, 2:01am
15
I like this one. Thanks again.
Just one more question, why do we need to disable the timer afterwards?
Taifun
November 7, 2023, 2:38am
16
because depending on the timer interval the clock might fire more than once
Taifun
1 Like
system
Closed
November 14, 2023, 2:38am
17
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.