how to update a document in mongodb every 24 hours?

10 views
Skip to first unread message

Rohan Devaki

unread,
Jan 5, 2022, 12:46:05 AMJan 5
to MongoEngine Users
how to update a document in mongodb every 24 hours?

i am using flask ,mongoengine and mongodb, 

how to update a document for every 24 hours? 


Clara Daia

unread,
Jan 5, 2022, 1:38:42 AMJan 5
to mongoeng...@googlegroups.com
I imagine you need another job for that. Cron can make a script run every 24 hours, or you can use the schedule package inside python:  https://pypi.org/project/schedule/

If this is in production you might want to turn it into a init.d service to make sure it runs again if errors occur.

--
You received this message because you are subscribed to the Google Groups "MongoEngine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongoengine-us...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongoengine-users/6dedc3fb-301b-4592-bc73-21e762a537ccn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages