Difference between revisions of "X-Cart:Cron.php - Script for Periodic Tasks"
Line 17: | Line 17: | ||
If you decide to set up X-Cart to launch <u>cron.php</u> automatically, you will need to adjust the setting '<u>Run the script that launches execution of periodic tasks once per N user sessions</u>' in the [[X-Cart:General_Options#Miscellaneous | '<u>General Settings/General options</u>']] section. | If you decide to set up X-Cart to launch <u>cron.php</u> automatically, you will need to adjust the setting '<u>Run the script that launches execution of periodic tasks once per N user sessions</u>' in the [[X-Cart:General_Options#Miscellaneous | '<u>General Settings/General options</u>']] section. | ||
− | <u>Example</u> of command line to launch the script: | + | <u>Example</u> of command line to launch the <u>cron.php</u> script: |
<pre> | <pre> | ||
cd /var/www/vhosts/yoursite.com/httpdocs/xcart; /usr/bin/php -d safe_mode=Off cron.php --key=c901d65fc15ff15d0ac0af967437d051 | cd /var/www/vhosts/yoursite.com/httpdocs/xcart; /usr/bin/php -d safe_mode=Off cron.php --key=c901d65fc15ff15d0ac0af967437d051 | ||
</pre> | </pre> |
Revision as of 16:04, 25 April 2012
X-Cart provides a script cron.php which you can use to launch execution of periodic tasks.
The tasks include:
1. Checking whether authorization has expired for any payment transactions in Pre-authorized status and setting the status of the respective orders to Declined.
2. Checking whether authorization is going to expire for any payment transactions in Pre-authorized status and sending email notifications thereof to the store's Orders department.
3. Sending out survey invitations (when X-Survey add-on module is used).
You can choose to launch the script cron.php from the command line or to set up X-Cart to launch this script automatically. Launching cron.php from the command line gives you a bit more control: you can decide exactly when you wish the script to be launched. Allowing X-Cart to launch this script automatically saves you time and effort: X-Cart will launch the script once per a predetermined number of user sessions.
If you choose to launch the script from the command line, you will need to adjust the setting 'Key for launch of the cron.php script' field in the 'General Settings/General options' section.
If you decide to set up X-Cart to launch cron.php automatically, you will need to adjust the setting 'Run the script that launches execution of periodic tasks once per N user sessions' in the 'General Settings/General options' section.
Example of command line to launch the cron.php script:
cd /var/www/vhosts/yoursite.com/httpdocs/xcart; /usr/bin/php -d safe_mode=Off cron.php --key=c901d65fc15ff15d0ac0af967437d051