Page 1 of 1

Run script if app closed

Posted: Tue Apr 07, 2015 7:19 pm
by Ben Walker

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!


Run script if app closed

Posted: Tue Apr 07, 2015 7:22 pm
by Egor Kotov6832188

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.


Run script if app closed

Posted: Tue Apr 07, 2015 8:57 pm
by Ben Walker

Thanks Egor

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


Run script if app closed

Posted: Wed Apr 08, 2015 3:15 pm
by Serhii Kulibaba

Hello Ben,

Please look here