(→Free Online Cron Scheduler) |
Sinisakrisan (Talk | contribs) m (Sinisakrisan moved page Setting up Cron Job to Setting Up Cron Job) |
(No difference)
|
Revision as of 11:33, 9 March 2013
Contents
Overview of Cron Jobs
For JomSocial to run properly, you will need to set up a Cron job to run periodically. By unloading a processing task to a scheduled job, JomSocial will be able to run faster and smoother.
The Cron job is required to:
- Avoid excessive processing to send out system emails during a normal page load.
- Archive old activity stream logs that are no longer relevant.
- Convert uploaded videos to standardized .swf files.
- Perform optional administrative jobs such as remove old, unused photo album, which doesn't have any photos
Built-In Cron Job Option
Use this option if you are not using JomSocial video upload feature. By enabling this, JomSocial will process Cron on every page load, with an interval of five (5) minutes in between.
- This option will only process email-related Crons. It will not run any maintenance script, Amazon S3 transfer, or video conversion.
- Avoid this option if your site is heavy with concurrent users (10+ users at one time) because it may have effect on performance.
- Avoid this option if you enable video upload feature and rely on other Cronjob methods instead.
Cron on Linux Systems
On most Linux systems, you can simply run the commands below. We would recommend running the Cron every thirty (30) minutes or less. On a busy site, you might want to run it every ten (10) minutes. The more frequently you run it, the less load there will be on the server.
- lynx -source "http://www.domain.com/index.php?option=com_community&task=cron" > /dev/null
Lynx is a text-based browser that is installed in most hosting environments. If you do not have Lynx installed, you can use other alternatives such as wget, shown below:
- wget -O /dev/null "http://www.domain.com/index.php?option=com_community&task=cron" > /dev/null
Don't worry, this operation actually runs very fast and has very little impact on the server, equivalent to a normal single page load.
Setting Up Cron Job in cPanel 11
To add a new CronJob in cPanel 11, login to your cPanel and click Cronjobs under the Advanced section as the screenshot below.
After clicking Cronjobs, you will be directed to a page similar to the one below. In this example, click Standard to proceed.
Enter the following command in the Command to run field on the screen shown below it:
- lynx -source "http://www.yoursite.com/index.php?option=com_community&task=cron" > /dev/null
Select Every Five Minutes, Every Hour, Every Day, Every Month, and Every Week Day so that the action above will be executed every five (5) minutes perpetually.
Cron Jobs at GoDaddy
GoDaddy doesn't support cronjobs from the panel. Using an online cron scheduler (look below) should solve the problem.
Free Online Cron Scheduler
If you are still having trouble with the above options, use any free online Cronjob scheduler service available on the web. Do not worry on security because what these sites do is merely accessing index.php?option=com_community&task=cron at certain interval, which is open to anyone.
Popular services include: