Friday, October 23, 2009
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 http://www.example.com/cron.php with http://www.example.com/cron.php 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
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
Thursday, October 8, 2009
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 :)