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()"
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()"
精彩评论