Sunday, November 1, 2009

CronJobs are warranted to execute on time

The uptime button of SetCronJob indicates that my site is up 100% in 33 days.

But, sooner or later there will be a downtime, and I can't control that :(

In a downtime, you can't access my site, and your Cron Jobs will not be executed. And that's a really big problem. As mentioned before, your cron jobs will be executed later. But it becomes a bad idea when SetCronJob offers cron jobs every minute.

So, I've created a system that warrant your cron jobs to execute on time, even when the main server is down.

How it works?

I just buy a web hosting (called secondary server), and it automatically gets a copy of main server's database every 30 minutes. When the main server is down, it will used that database to execute your cron jobs.

When executing your cron jobs, the secondary server will do everything exactly like main server, except Logging and Notification: the output will not be stored into main server's database, and you will not get notification message.

All of your cron jobs will executed on time and you will not be charged (account balance keeps unchanged) when main server is down.

In other words, the secondary server will not update the database of main server.

Secondary server's IP is 188.40.68.118, and it's user agent is same with main server: SetCronJob/1.0 (+http://www.setcronjob.com/).

---
Thanks Sebastien WILLEMIJNS for the idea :)

No comments:

Post a Comment