Delete files after session ends

Hi everyone,

I would like to clean GCP folder that my dash app writes to after a user session ends, is there any way to that ?


@nedned: do you have any suggestion for this?

How do you define ‘when a session ends’?

when the user close the app.

Determining when a session ends is very hard.

Can you instead clean up the folder periodically - say daily or weekly - by deleting older files? If you can’t run a periodic job, then another approach could be to delete older files when the application is started.

Thanks, this actually is a good idea. I can get the current time and remove anything for a day before anytime I am working with the app.