Reputation: 11136
I am trying to run couple of Mongo scripts automatically after MongoDB server start.
I tried looking into various options in mongod.conf , but did'nt find any solution.
Could you please help me.
Software used:
MongoDB Community version 4.0.8
Windows 7 64 bit
Upvotes: 0
Views: 1112
Reputation: 22316
Unfortunately MongoDB does not have any support for triggers.
As other people have commented if you have a certain schedule you can work around that.
You can also try and use other services like Mongo Stich where there's no real trigger like server restart but you can work around it with binding a trigger to an event like first insert or first login.
Upvotes: 1