Currently we are using apache flume framework to collect the logs from all our web applications and it will store the logs in MongoDB database table called “Raw_Data”. Now we go
MongoDB has stored Javascript procedures, but no scheduler.
http://docs.mongodb.org/manual/tutorial/store-javascript-function-on-server/
You could trigger this from a client machine using a cron job and the mongo shell. However, I strongly recommend simply running a script in Python or similar client-side scripting language. It'll be far easier to version-control and to debug than server-side Javascript.