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:
Failover for High Frequency Jobs
I have a job that runs at a fairly high frequency (~1x every second).
My cron works when given * in hh, but doesnt when I give a numeric value
This works:
* * * * * export DISPLAY=:0; /usr/bin/vlc --play-and-exit /home/tc/Music/test.ogg
(Plays every minute)