# How to use the previous values in a task run in the cloud

The following code from the example in the Application section of http://reference.wolfram.com/language/ref/ScheduledTask.html.

CheckForFullMoon[] :=
If[MoonPhase[Tomorrow] > 0.99, SendLunarAlertMail[]]


This code uses a constant, 0.99, but if I want to replace the constant by a previous value (such as MoonPhase[Yesterday]). How to do that?

P.S. In fact,I want to compare the price between today and yesterday, so Wolfram Cloud should remember the price of yesterday. I have no idea how to remember the values of a previous case in the cloud.

• You need to store the old data somewhere. A normal file would do. A more advanced option would be to use Wolfram Research's new Databin function, take a look here. – C. E. Mar 18 '15 at 13:42
• @Pickett sounds great.it is a useful command. – partida Mar 18 '15 at 13:52