I want to run the db.clickreferrerurls.remove() command for mongodb from crontab, specifying the cron job on the local machine.
db.clickreferrerurls.remove()
How could I do this?
Use the --eval argument for mongo . eg.
--eval
mongo
/usr/bin/mongo --eval "db.clickreferrerurls.remove()"