Tuesday, September 29, 2009

SetCronJob is a FREE cron job?

Last updated on Thu, 21 Jan 2010

Is SetCronJob a free service? Yes, obviously :D

SetCronJob offers FREE Account which is FREE to sign up. With FREE Account, you can create unlimited cron jobs every 5 minutes. Free account will never expire.

Check FREE Account vs Premium Account at SetCronJob.

Friday, September 25, 2009

Everything goes stable

After a big downtime, then delay 15 seconds on outgoing connection, then down again, now every thing goes stable.

Sorry for any inconvenience caused by this downtime.

Delay 15 seconds on connecting...

Sometime you may see the connection time is more than 15 seconds although the max connection time is only 3 seconds.

I had asked my hosting provider, and was told that it's scheduled network maintenance (??).
It often lasts about 1 or 2 hours.

Here's the message from HP:
It's possible that the delay you experienced was due to the planned network maintenance that took place...

As SetCronJob calculates price by connection time and output length, if the connection time is more than 15 seconds, it will be decreased by 15. For example, you see the connection time is 15.2 seconds and output length is 0.9 KB, the cost will be ceiling(15.2 - 15) + ceiling(0.9) = 2 (*$0.00001).

This will be considered a downtime, and SetCronJob's daemon will not work when this problem occured although you can access SetCronJob normally. All missing jobs will be executed later.

Thursday, September 24, 2009

Missing jobs will be executed.

As I cannot control the server downtime caused by my hosting provider, from now on, all missing jobs after a downtime will be executed later.

There are 3 solutions:

- Execute all missing jobs when my server is up.
This is a big bang :D and of course I don't use it :)

- Execute all missing jobs along with new jobs.
E.g, my server is down at 22:01, and it's up again at 23:01, so at 23:05, it will execute all cron jobs that should be executed at 22:05 (missing jobs) and 23:05 (new jobs).

But this may be a bit terrible if your heavy script (e.g backing up) run at the same time: if you set cron job every 30 minutes, at 23:30, it will run twice a minute :(

- Execute all cron jobs 3 times faster than normal.
With the example above, at 23:05, it will execute all cron jobs that should execute at 22:05, 22:10, 22:15.
At 23:05, it will execute all cron jobs that should execute at 22:20, 22:25, 22:30.

This will affect all normal cron jobs, but it the best way that I can do :)

After the downtime length / 2, every thing will go normally.

4.5 hours of downtime >"<

SetCronJob was down from 22:00 GMT Sep 24, 2009 to 2:30 GMT Sep 25, 2009.

This is unexpected network maintenance of my hosting provider.

Sorry for any inconvenience.

Here's the message from my HP:

We need to perform some emergency network as soon as possible. This has been scheduled for tonight, which we appreciate is very short notice. We need to reboot a router to install new software, and this reboot will take up to 45 minutes. We will do everything we can to speed up the process as much as we can and reduce the maintenance time.
Date: 24/09/2009
Window: 23:00 for 2 hours
Duration: < 45 minutes.

The maintenance is to perform an emergency upgrade of Cisco software. We are using a Cisco VSS-1440 as part of our network core, and we have been experiencing some reduced performance with it today. There is no cause within our network configuration and set up of this, and it started to have a detrimental effect on some clients today. We escalated this to the Cisco TAC team, who have diagnosed a fault with the software on the router in the form of a memory leak. Cisco has supplied us with a new version of the software for the router which will fix the memory leak and slow performance.

The nature of this problem is that it will escalate as time goes on, which is why we want to apply the fix as soon as core business hours finish today. Please accept our apologies for the short notice, we hope our clients appreciate this problem was out of our control caused by Cisco software, and we are working as best we can to resolve it quickly.

We apologise for any inconvenience this may cause, please do not hesitate to contact us if you have any queries or questions regarding this maintenance window.

Sunday, September 20, 2009

Some small changes

- Users can now login with email as username. Simply enter your email into username field, your password then press Enter.

- Cron jobs will be disabled after 24 consecutive failures. (Old value is 3 times.)

- In Basic HTML Control Panel, you must confirm the deletion.

Friday, September 18, 2009

Server Uptime, Server Load and Server Time

I've added a server uptime button (from host-tracker),  server load and  server time stats at the homepage.

This is useful for me to monitor the site uptime and server load.

You may see every 5 minutes, the server load goes high, about 0.10, then downs to zero after 1 - 2 minutes. That's time my cron daemon is launched.

Wednesday, September 9, 2009

Prevent your script from running when create/enable cron jobs

UPDATED on Jan 24, 2010: Now SetCronJob will execute your script and check for problem only when create / enable failed cron jobs.

Every time you create / enable your cron job, your script will be executed. If you don't want this, follow this tip:

1. Move your script to other (temporary) location.

2. Create an empty file with script's name in its directory, e.g cron.php.

3. Create/Enable your cron job.

4. Delete empty file, and move your script to its original location.

This can be applied with all scripts.

If your script is written in PHP, add this


at beginning of your PHP script.

Other server-side programming languages may have its exit function. Check its documentation.

Tuesday, September 8, 2009

SetCronJob version 3.0

Hi all,

I'm happy to introduce SetCronJob version 3.0 now :)

1. No migration.

Don't worry, there's no change in users table. No need to register new account :)

2. Logging, Notification, TimeOut.

You can now set (MAX) execution (response) time. E.g, if your script executes completely in 24 seconds, set TimeOut to at least 24 or 27 seconds.

Maximum execution time is 60 seconds.

Logging feature must be enabled to enable TimeOut and Notification.

3. Price and cost: every thing should be fair.

Cost of a cron job once being executed is calculated using this equation:

COST = CEIL(Total execution time in second)*$0.00001 + CEIL(Output length in KB)*$0.00001 + Number of sent messages*$0.00010

Check it at Cron Hosting.

in version 2.0, a cron job without logging output may take up to 3 seconds to complete (it's the max connection timeout), and its cost is only $0.00001. A cron job with logging output may take only 0.1 seconds to connect, and 0.2 second to get response less than 0.1 KB, and its cost is $0.00010, which is 10 times bigger than the first one :)

In version 3.0, first cron will cost $0.00003, and the seconds one is only $0.00002, which is only 2/3 of the first cron, and 1/5 of version 2.0.

You can see that the smallest cost of a cron job is $0.00001 - without logging, and $0.00002 - with logging output, instead of $0.00001 and $0.00010 in old version.

And, if your cron job without logging output, and connection time (include request time) is less than 1 second, there's no change at its cost: $0.00001 / cron job execution.

As this version allows users to set max response time, your cron jobs which are in queue will be executed within 120 seconds from set time. E.g, if it should run at 1:15, it may execute between 1:15:00 and 1:17:00.

Version 1.0 are still kept at old.setcronjob.com.

Sunday, September 6, 2009

Basic HTTP Authentication

A bug on Basic HTTP Authentication has been fixed. 

If users try to create a cron job with URL containing username:password@, the URL becomes scheme://1domain.name/path.....

Thanks Fred for informing me :)

Saturday, September 5, 2009

Set cron jobs with PHP scripts

Here are some tips to make your PHP script work perfectly:

Official tips



at beginning of your php file(s). This will let your script run until it finishes all jobs and doesn't care about users' stop button :)

Thanks Francesco for this tip :)

Personal tip

As most shared hosting disable functions set_time_limit and/or ignore_user_abort, you'd better don't output anything, or your output should be less than 4KB. Remember not to force your script to output (i.e using flush).

I tried it with shared hosting and my current server (LAMP), and my script which requires 150 seconds to complete works perfectly when set cron job at SetCronJob.

Wednesday, September 2, 2009


phpJobScheduler is a PHP script that lets you create and execute cron jobs based on visitors.

As there're enough information at its home page, I won't tell too much about it :)

Here's the homepage link: http://www.phpjobscheduler.co.uk/

It's useful if you wanna create and manage your cron job by yourself without relying on other services.

Register now, and get 10,000 cron job executions for FREE!

From now on, when registering with SetCronJob, you'll get $0.10, or 10,000 FREE cron job executions.

Enjoy it!

Some small changes

- Remove captcha at Contact page when you're logging in.

- You must click on 'click' under ID/Name to enter name for new cron job.

- Add Tip at bottom of Control Panel.

- List some features at home page.

- Add Western Union as a payment method at Cron Hosting.

- Remove Send money feature, as nobody uses it.

- Please take time to let me know what you think :)

Connection time and response time

I've split Execution time into Connection time and Response time.

From now all, when viewing cron jobs' logs, you will see these two values.

For example, here's part of my logs for URL http://www.setcronjob.com/

Last execution time : Wed, 02 Sep 2009 11:45:08 UTC
Connection time : 0.0144
Response time : 0.000835

HTTP/1.1 200 OK
Date: Wed, 02 Sep 2009 11:45:08 GMT
Server: Apache
X-Powered-By: PHP/5.1.6
Content-Length: 6195
Connection: close
Content-Type: text/html; charset=UTF-8
Content-Language: en


At SetCronJob, the max connection time is 3 seconds, and max response time is 2 seconds.