In order to execute a PHP file from the CRON, you need to add a line to your PHP script. It has to be the first line of your script and must contain your server's PHP executable location: #!/usr/local/bin/php -q As an example, the above line would go before the start of the PHP code: Now, in your cPanel area, click on the CRON and then the particular job you want to run. For the commnad line put in the following; 0 23 1 * * php /path/to/your/cron.php Please note, executing a crontab every MINUTE or every couple of minutes is a quick way to get your site suspended. Don't do it! Also, since crons run in the background, it's sometimes difficult to see how long something has been running. If you tie up system resources, it's another method in how your site can be suspended. If you have questions about your CRON file, please contact support.
<?php
phpinfo();
?>
* * * * * command to be executed
- - - - -
| | | | |
| | | | +----- day of week (0 - 6) (Sunday=0)
| | | +------- month (1 - 12)
| | +--------- day of month (1 - 31)
| +----------- hour (0 - 23)
+------------- min (0 - 59)
- 0 Los Usuarios han Encontrado Esto Útil
Artículos Relacionados
Powered by WHMCompleteSolution