Hi. Say, I have a cf file which accepts real-time event and store the events in the same table with status "not sent".

I have scheduled a task to run at every 5 minutes to check if there is any record in a table in the Database which has status = "not sent". After processing each event, it will update the status to "sent". With that configuration, my task will only check and update appropriately every 5 minutes.

How can I make it such that, whenever there is a http request to my system, after the first form inserts a record into the database with status "not sent", it checks if the scheduler is running. If it's not running, it will invoke the scheduled task. Else, it will wait for the scheduler to finish running and immediately call it to serve the current event.

I hope I conveyed my message well enough. :-)

try using the cfscheduler tag.....after your event gets completed....

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.