Tuesday, 6 August 2013

Server-side scheduled tasks: need to schedule a task that happens with a frequency of 5 seconds

Server-side scheduled tasks: need to schedule a task that happens with a
frequency of 5 seconds

I need to write a server-side program that lives on the server, and is
checking a database consistently for new entries.
When a new entry shows up in the database, the program should process the
data and put the results somewhere else.
It is important to hi-light that the process isn't instigated by new
entries showing up, but by the program checking for new entries on its
own.
Some people I've spoken to brought up cron jobs, I was curious what if
this is the solution for me? I see that it has limitations, it won't run
less than every minute. I was hoping for the program to run every 5
seconds, would I be better off writing a shell script or is that a bootleg
fix?

No comments:

Post a Comment