Cron
When cron.php is launched, statistics is recalculated, monitoring is performed, and old data is cleaned.
Command variations
Wget:
wget -O /dev/null -q http://your-domain.ru/directory_tds/cron.php
CURL:
curl -s http://your-domain.ru/directory_tds/cron.php > /dev/null
PHP:
php -f /full_path_to_tds/cron.php
PHP CLI:
php-cli /full_path_to_tds/cron.php > /dev/null
Note: To make sure commands are working,it is highly recommended to launch them in server console
How can I find out the path to cron.php script?
ISPManager
ISPManager 5
Direct Admin
- Minutes: *
- Hours: *
- Days of the Month: *
- Months: *
- Days of the Week: *
Command: wget -O - -q -t 1 http://domain.com/cron.php
Crontab (Ubuntu, CentOS, Debian)
Run:
$ crontab -e
The VIP will be opened. Press āiā, then paste:
* * * * * php /full_path_to_tds/cron.php
Press ESC and type the command :wq
, Enter. You'll see a message that cron has been updated.
cPanel
For what reasons cron does not work?
- ioncube is not connected at PHP-CLI . Check it by running the command from a server console.
- The script is interrupted by an error. Check the error log var/log/errors.log.
- The path to the file cron.php is not correct. Check it by running the command from a server console.
- Curl (wget) is used but it`s not installed on the server. Try both variants: with wget and curl.