Relative Content

Tag Archive for cron

Design Pattern for Cron/Schedule in MongoDB

I am looking for a good pattern to handle cron-type data in a MongoDB collection (or collections). I have been peeking at the O’Reilly book MongoDB Applied Design Patterns and poking around the MongoDB site’s Use Cases site but neither seems to to cover this type of data.

Executing a script continuously

I’m currently working on a PHP script that receives emails sent to a specific address and replies according to their content.
It’s working great, but now I need it to be executed every 10 seconds.
Here’s what I’ve tried to accomplish that: