Is Timer Run Successful?
Question
Application Type
Reactive

Hello All,

I have two timers, second timer should run after successfully run the first timer, So I need to get the first timer status before triggering the second one.

Here we can use Entity - Meta_Cyclic_Job to get the time information.

If there is a way to determine if a timer has been run successfully. I know I can count the amount of retries, but is this value reset back to 0 once the timer has succeeded again?

If you have any answer please please let me know,

Thanks And Regards

Asif

Hi Asif, 

You can start the 2nd timer from within the flow of the first timer. Use the WakeTimer server action that is automatically created for you when setting up a timer. If you place this at the end of the flow of your first timer, you know that the timer run was succesfull without doing any checks.

Hello, Asif.


At runtime, it is hard to determine if a timer has been successful other than having some structure to control the changes you required. 

But wouldn't a wake timer at the end of the first timer be enough to do what you intend?  

Regards,

Gonçalo

mvp_badge
MVP

Hi Asif,

Please check the below post as well.

https://www.outsystems.com/forums/discussion/62083/outsystems-timer-status/ 

Regards,

Manish Jawla

Hi Jong,

Thanks for quick response,

Currently my logic is same as you refer, but the thing is if I wake up second timer at the end of the first timer in this case I have a doubt. 

If I have lot of records to create in loop in first timer assume the first timer is failed due to timeout then the flow will continue? Means the second timer will run?

Usually if we get any error in server action the flow will not continue, but in timers I don't know what will happen if the timer fails.


Thanks and Regards,

Asif.

mvp_badge
MVP

Hi Asif,

Timers are just Actions that are scheduled, so if there's an Exception, the flow doesn't continue.

mvp_badge
MVP

Hi Asif,

May be the below solution will work for you:

1. Create one entity to capture the status of request you send to your first timer, with basic columns Id, request  datetime & status column.

2. When you execute or send the request to your first timer first create a entry in this table like request:  001, with status in progress (may be 1 act as progress, 2 act as complete, 3 act as fail).

3. Once you are complete with the processing update the status of your request with 2 Complete (commit the db transaction) and then trigger the second timer.

 4. Before the execution of your second timer check the status of your previous request order by desc order so that you will always get the latest request on the top, check it's status if it's complete then continue execution else end.

5. If during the execution of your first timer any error occur or exception then add the logic on your exception handler to update the status of your request to 3 Fail.

6. Now you have 3 status maintained in your db and now you can control the execution of both the timer and customize it like re-execute the failed request, do not process which is complete, etc,

Hope this helps, just an idea.

Regards,

Manish Jawla 


Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.