8
Views
5
Comments
[HTML Toolbox] Activate scheduled timer not executing
Forge component by João Quitério
0
Published on 09 Apr 2007
Application Type
Mobile
Platform Version
11.11.0 (Build 26942)

Hi,

I am trying to create a timer that runs every 10 minutes, through the Service Center. The timer looks fine, however, it does not run, even when I click Run Now. I can also see the timer records in the Timer Log.


Thank in advance,

Ana Sofia Alves

Rank: #54

Hi Ana,


The timer ran at 19:10 (each 10min) like you configured as you can see on the Last Run under Timer Reports section on the right bottom side of the screen. Apparently it didn't have much to do as it took 0s to run.

Have you checked the code to see what it does? Perhaps it is not founding data to perform whatever the action it should perform.


Additionally, you opened this post as a support case for HTML Toolbox, component which seems to be now deactivated.


Kind Regards,
João

Rank: #66099

Hi João,

First of all, thanks for your answer!

I have an action that verifies some data and, if necessary, sends a push notification to the user (using OneSignal plugin). I tested the action separately and it is working as intended. So, I don't understand why it doesn't run through the timer. Is there any other way to check the execution of the action through the timer?


About the HTML Toolbox component, sorry for my ignorance, I didn't intentionally add it.


Thank you again,

Ana Sofia Alves

Rank: #54

Hi Ana,


You can debug and see what's going wrong on the action when the timer is triggered.

Is it possible that you're using GetUserId() in your action? Since the timer runs asynchronously, there is no user in session and therefore the output of GetUserId is NullIdentifier() which would explain the different behavior when you test it "separately". This is just a hunch but it's a common behavior overlooked which causes this kinds of issues.


Kind Regards,

João

Rank: #66099

Hi João,


I'm sending the notification to all users (with the SendPushNotificationToAll() action), so I don't use GetUserId () at any point in the action. I'm going to debug as you suggested to see what's wrong with the action when the timer is triggered.


Thank you for all your help,

Ana Sofia Alves

mvp_badge
MVP
Rank: #71


If your action is very simple, it can take 0 seconds and do something.

Only by debugging or logging, you can be sure if it did something or not.