开发者

Define cron for mongodb table removing

开发者 https://www.devze.com 2023-03-11 15:41 出处:网络
I want to run db.clickreferrerurls.remove() command for mongodb from开发者_运维百科 crontab by defining cron job at local machine.

I want to run db.clickreferrerurls.remove() command for mongodb from开发者_运维百科 crontab by defining cron job at local machine.

How I could do this?


Use the --eval argument to mongo. e.g.

/usr/bin/mongo --eval "db.clickreferrerurls.remove()"
0

精彩评论

暂无评论...
验证码 换一张
取 消