6
 Followers
47
 Likes

Pass parameters when calling "Wake Timer"

Backend
On our radar
Since "Wake Timer" can be called via code, it would be good to be able to pass paramters to it.

J.Ja
Created on 13 Sep 2014
Comments (12)
Agreed. I also have a situation where i would need to pass arguments to the timer.
Have you found a workaround?
Joao -

Yes, you make an entity representing the parameters, and the timer queries it, processes based on the saved parameters, and deletes the record when it is done. It is not ideal, but it works.

J.Ja
Merged this idea with 'Possibility to add input parameters in Wake Timer action' (created on 2010-06-07 12:23:49 by Fernando Santos)
Wake Timer action doesn´t accept input parameters. It was nice if we can input information inside a timer.

Merged from 'Possibility to add input parameters in Wake Timer action' (idea created on 2010-06-07 12:23:49 by Fernando Santos), on 2016-10-25 08:28:16 by Goncalo Borrega
I had the same feeling the other day when I had to use a WakeTimer, but since calling the WakeTimer multiple times does not mean it will run more than once (if its really fast) this is not really an option.

Instead of asking for inputs for WakeTimers to simulate that behavior maybe it should be a feature request for built-in asynchronous action calls.


Merged from 'Possibility to add input parameters in Wake Timer action' (idea created on 2010-06-07 12:23:49 by Fernando Santos), on 2016-10-25 08:28:16 by Goncalo Borrega

That's a better approach! And it could make apps multi-treading!


Merged from 'Possibility to add input parameters in Wake Timer action' (idea created on 2010-06-07 12:23:49 by Fernando Santos), on 2016-10-25 08:28:16 by Goncalo Borrega

I agree with João's suggestion!


Merged from 'Possibility to add input parameters in Wake Timer action' (idea created on 2010-06-07 12:23:49 by Fernando Santos), on 2016-10-25 08:28:16 by Goncalo Borrega

It would really be very interesting!

This is what we need for our apps! In some occasions we're using synchronous calls since we can't pass any parameters to timers. Which is a waste of the users time! What's the status of this idea?!

You can do this, however you must use a Site Property for Input


Action

Timer

Call Logic



Hey Heryck,

If you use site properties in that manner, you run the risk of missing one in case there are concurrent requests that would wake the timer.  You cannot guarantee that the site property will not be overwritten prior to the timer waking.

I would recommend using a table to keep the ids and then querying that in the timer to avoid this possible issue.

In my logic I did a check if the Timer is already running, and if so, it returns a message to the user, I also put a check to be able to call the functionality only after one minute of the last call.

But you can do this control with a table too, but it would not be passed by input, and if it were, you would probably have to do the same valuations above


Thanks for your comment.

views
992
Followers
6