Tuesday, December 16, 2014

Windows azure Mobile service, delete expired data automatically.

It turns out Azure mobile service is way more powerful than you think. I setup a simple mobile service table to hold some incoming logs.

on the table itself, I created one node.js API for insert, basically insert a timestamp in long named dt. (I found this very useful for you to delete the old data , like logs week ago)

image

then every incoming logs will be applied with the timestamp. now create another scheduler to run  daily and check to delete old logs

image

and config it to run daily

image

then in the log you will see the daily run

image

No comments:

 
Locations of visitors to this page