Difference between revisions of "Cron Configuration"
m (→Plesk) |
|||
Line 105: | Line 105: | ||
===Plesk=== | ===Plesk=== | ||
+ | |||
+ | You can specify the php command using the following on Linux Plesk: | ||
+ | |||
+ | env php -q /home/user/whmcs/admin/cron.php | ||
[[Image:Pleskcron.jpg]] | [[Image:Pleskcron.jpg]] |
Revision as of 17:08, 14 May 2010
The WHMCS cron job is the process that performs all the automated actions.
Just 1 single cron job needs to be setup to automate all the core functions of the system (invoicing, reminders, suspensions, etc...)
The cron must be configured to run no more than once per day.
Contents
Setting Up Cron Jobs
The tutorials & screenshots below demonstrate how to configure the WHMCS cron on the most common hosting control panels.
You can obtain the exact cron command you need to use for your installation from Setup > Automation Settings at any time.
The examples below will setup the cron to run at 9am every day.
cPanel
We have prepared a video tutorial for this section: http://whmcs.com/tutorials.php?i=1
Click on the Cron Job link in cPanel and then click the Standard button.
Alternatively click the Advanced (Unix Style) button and use the following:
Option | Minute | Hour | Day | Month | Weekday | Command | ||
---|---|---|---|---|---|---|---|---|
a) | 0 | 9 | * | * | * | php -q /path/to/home/public_html/whmcspath/adminpath/cron.php | ||
b) | 0 | 9 | * | * | * | wget -O http://www.yourdomain.com/whmcspath/adminpath/cron.php >/dev/null | ||
c) | 0 | 9 | * | * | * | get http://www.yourdomain.com/whmcspath/adminpath/cron.php |
Direct Admin
the command for Direct Admin is generall the same as cPanel, however, you need to reference the full path to the php binary.
This can be /usr/bin/php, /usr/bin/home/php or /usr/local/bin/php but this is dependent on the server setup and you should check with your Server Administrator for the full path to the php binary.
An example command to run is:
Command |
---|
/usr/bin/php -q /home/demo_user/domains/testdomain.com/public_html/whmcspath/admin/cron.php |
/usr/local/bin/php -q /home/demo_user/domains/testdomain.com/public_html/whmcspath/admin/cron.php |
wget -O http://www.yourdomain.com/whmcspath/admin/cron.php |
GET http://www.yourdomain.com/whmcspath/admin/cron.php |
Windows Server / DotNetPanel
Depending on your server setup, you can run the cron directly from the php executable. If this is not possible, you would need to use the server browser to run the cron
An example command to run is:
Command |
---|
C:\php\php.exe -q "C:\inetpub\wwwroot\whmcs7\admin\cron.php" |
"c:\program files\internet explorer\iexplore.php" "http://www.yourdomain.com/whmcspath/cron.php" |
You should then set the task to run at a certain time every day. The time is up to you.
Plesk
You can specify the php command using the following on Linux Plesk:
env php -q /home/user/whmcs/admin/cron.php
The Windows version of Plesk is slightly different. You need to specify the path to the php executable and then specify the path to your cron.php file.
Check the appropriate boxes to run at the time you wish and press ok to save.
Helm
InterWorx
Option Flags
Passing in option flags to the cron process allows you to customise the actions that get performed. By default, all actions will run but you can pass in any of the flags below to skip certain processes.
- skip_invoices
- skip_latefees
- skip_ccprocessing
- skip_invoicereminders
- skip_domainrenewalnotices
- skip_suspensions
- skip_terminations
- skip_cancelrequests
- skip_closetickets
- skip_affreports
- skip_ccexpirynotices
- skip_usagestats
- skip_backups
Flags are passed in by simply appending them to the cron command, for example to not run CC processing you could use "php -q /home/username/public_html/admin/cron.php skip_ccprocessing" or alternatively as a browser request, like this "get http://www.yourdomain.com/admin/cron.php?skip_ccprocessing=1"