Ben Walker
Posts: 0
Joined: Mon Jan 19, 2015 2:13 pm

Run script if app closed

I need to delete information in a DB 10 minutes after it is created, even if the app is closed.

Currently, I am using a setTimeout and calling a delete service in order to delete the DB information after 10 minutes. However, if the app is closed, I don't think this will work?

What should I try?

Thanks in advance!

Egor Kotov6832188
Posts: 0
Joined: Wed Nov 19, 2014 5:15 pm

Run script if app closed

Hello Ben,

The best approach for this feature is to use Server Code script, which will be invoked every 10 minutes.
You can try to launch your service before app was closed, on exit event, but there is no guarantee, that all will be send and service will end it work with success.

Ben Walker
Posts: 0
Joined: Mon Jan 19, 2015 2:13 pm

Run script if app closed

Thanks Egor

Can you give me some pointers? New to Server Code.

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

Run script if app closed

Hello Ben,

Please look here

Return to “Issues”