I am making an auction website, which has an auto-bid system. This system lets people make biddings without having to be there.

My question is how to implement such a system. I have made the php files and everything is ready, I've made a html page which refreshes every second. It works, but I'm wondering if there's a better solution.

The second option I tried was making an java application which opens the webpage every second. This consumes "a lot" of memory/CPU. Also, I think there is a memory leak somewhere.

I am running this application on a dedicated linux server with centOS and Plesk, so I am sure there are a lot of alternatives.

For example:

1. A cronjob that executes a php file every minute, where the php file loops for a minute with sleeps.
2. One php file that loops with 1 second sleeps.
3. One cronjob that executes and schedules another cronjob after a second.
4. MySQL scheduler, but I don't know how to implement that, and I heard it locks the db for other writes.
5. I also heard about cli, perl, python scripts, but I am not familiar with any of them.

Please can someone with any knowledge of these options please shed some light for me on this subject. I am searching for a solution that is best suited in terms of speed and memory usage.

If someone has another alternative solution I would be glad to hear that also.