How to create a scheduled trigger to drop the database daily?

I’m trying to create a scheduled trigger to drop the database at a certain time of the day.
I can’t find the correct command on the documentation. Is that even possible?
https://docs.atlas.mongodb.com/triggers/trigger-configuration/#scheduled-trigger-configuration
My cluster is an M10 and I use it to demonstrate an application, that’s why I have to drop it daily.
Thanks.

Hi @Felipe_Lima

I don’t think realm will allow you to drop databases from a function.

What you can do is remove all documents via trigger set to system. Won’t that have the same affect?

You can also recreate a cluster via the Atlas API similar to

One final “hack” you can do is to load a dependency of MongoDB Node Js driver and have a plain connection to the database to perform the drop…

https://docs.mongodb.com/realm/functions/import-external-dependencies/

Best
Pavel