Friday, October 23, 2009

PHP Cron Jobs - HowTo, Tips and Trick

How to set up PHP cron jobs?

To set up PHP cron jobs, there's two way to do:
- Using the /usr/bin/php /path/to/file.php command in your cron tab.
If you have access to CronJobs, you can simply enter that command into the "Command to execute" field.

But this way is not recommended, as your script may not run expected. It's difficult to parse some variable to the script, too.

- Set cron job to call its URL.
This is more convenient, and you can test whether your script executes as expected or not just by entering its URL into browser.
You can use the wget or lynx command to call that URL, and lynx is recommended, as it's a browser.

To set up PHP cron jobs with lynx, you can enter lynx with is PHP script's URL. You can also add some GET variable into the URL using ?var1=value[&var2=value2&....].
Or, you can try some free cron jobs services to set up your PHP cron jobs :) Most of them work perfectly, and have their own simple WebCron interface.

PHP Cron Jobs - Tips and Trick.
- To make sure your cron jobs run until finishing its jobs, you can try tips at Set cron jobs with PHP scripts.
- To prevent your cron script from running when you create / save / enable your cron at SetCronJob, read this tips.
- If you wanna set cron job every minute to do some small jobs, you can buy a cron every minute at price of $10 / year from SetCronJob.
- You may wanna build your own web cron service, and phpJobsScheduler is a good choice for you :)

Thursday, October 22, 2009

Cron job every minute!

Last updated on Jan 25, 2010.

With SetCronJob, you can create an unlimited number of cron jobs every minute for just $10 / year (Silver account).

From now on, you can create:

- Cron jobs every x minutes (x = 1, 2, 3, 4, 5, 6, 10, 12, 15, 20, 30)
- Cron jobs every x hours (x = 1, 2, 3, 4, 6, 8, 12)
- Cron jobs every x days (x = 1, 2, 3, 4, 5, 10)
- Cron jobs weekly
- Cron jobs monthly
- Cron jobs yearly (who need?)
- Any cron that you need :)

Monday, October 19, 2009

Sign in and get money :)

When you register an account, you will get $0.01, or 1,000 free cron job executions.

Now, when you log in, you will get 10 cron job execution / a day :)

Check it out :)

Thursday, October 8, 2009

Time pattern

I've just added Time pattern and Failure time at Basic HTML Control Panel.

The time pattern will look exactly like Crontab syntax, for example, cron job every 5 minutes has time pattern */5 * * * *.

Click on Basic HTML link at bottom of SetCronJob's Control Panel to see it :)

Sunday, October 4, 2009

Over 4 millions cron jobs have been executed :)

You can see the stats at SetCronJob's homepage:

Number of users: 1689
Number of cron jobs: 2601
Processed jobs: 4,034,205

Every day, SetCronJob processes about 120,000 cron jobs :)

Thank you for using SetCronJob :)