Temporary Cloud Objects

I want to create cloud objects that are only available for about a day. Can I somehow automate the deletion by setting some kind of timer somewhere?

As far as I understand it, everytime I use CloudExport[] the resulting object stays in the cloud until I manually delete it.

Best, Max

• afaic you need at least the developer plan and run appropriate scheduled task after deployment. In case of storing expressions you could experiment with PersistentValue or Databin both of which have expiration date setting. Another way could be to deploy a Delayed HTTPRedirect object which only redirects to the source before the expiration date. Not neat and it sill is there but something to think about. – Kuba Jul 18 '18 at 11:24
• Is there an overview somewhere about the functionalities with other plans? – MaxJ Jul 18 '18 at 12:27
• wolfram.com/development-platform/pricing – Kuba Jul 18 '18 at 13:34
• I can not find anything about scheduled tasks on the page you posted. Is it hidden on the page somewhere? – MaxJ Jul 18 '18 at 14:30
• There's a lot of subtle differences between the plans. ScheduledTasks are one of the things that differs a lot between pricing levels. The pricing page doesn't really cover everything in detail. – Searke Jul 18 '18 at 16:24

I'm not sure about this, as I have not used it myself, but from the documentation for PersistenceLocation

PersistenceLocation["Cloud"];

PersistentValue["b2", PersistenceTime -> Quantity[1, "Days"]] = 55;


or for objects

ClearAll[po];

po = PersistentObject["myob", "Cloud"];

po["ExpirationDate"] = Now + Quantity[1, "Days"];

po["Value"] = 17
(* 17 *)

Through@PersistentObjects[All, "Cloud"][All]
(* {<|"HeldValue" -> Hold[17],
"CreationDate" -> 3.7409028803224120*10^9, "Creator" -> "Rodolfo",
"ModificationDate" -> 3.7409028870557971*10^9,
"LanguageVersion" -> 11.3,
"ExpirationDate" -> 3.7409892791783465*10^9,
"MergingFunction" -> Automatic,
"ValuePreprocessingFunction" -> Automatic|>} *)

• Being experimental functionality, I would not be surprised if the PersistenceTime feature only applied to local objects - I guess I should try it out. – Searke Jul 18 '18 at 16:30
• It works! given that it does, I'm really surprised the option PersistenceTime wasn't extended for CloudObjects in general. – Searke Jul 18 '18 at 16:39
• @Searke I'm glad it helped. – rhermans Jul 18 '18 at 16:41
• @Searke does it work with APIs, Forms, ScheduledTasks? If it works only with values then it does not really works with CloudObjects but PersistentValues. – Kuba Aug 17 '18 at 11:29